Dcount

goat

Registered User.
Local time
Today, 16:11
Joined
Apr 15, 2003
Messages
10
Hello,

Really struggling to get DCount to work.

I need a text box's control source to be the amount of records in a column on a table within a criteria.

Please can you help !

Regards
The Goatboy
 
Well, what's the field called, what's the table called, and what's the criteria?
 
Table is TBLTABLEQUERY2
Field is EXP
Criteria is FX
 
When you say the Criteria is FX, I'm guessing that that is the name of a field in your table and also the name of a control on your form/report?

I don't know what data type FX is though.

If it's a number:

=DCount("[EXP]", "TBLTABLEQUERY2", "[FX] = " & [FX])


If it's text:

=DCount("[EXP]", "TBLTABLEQUERY2", "[FX] = """ & [FX] & """")


If it's a date:

=DCount("[EXP]", "TBLTABLEQUERY2", "[FX] = #" & [FX] & "#")
 

Users who are viewing this thread

Back
Top Bottom