Count in Control Sourse

AndyShuter

Registered User.
Local time
Today, 21:35
Joined
Mar 3, 2003
Messages
151
I'd like to know how to count a certain number of records from a record set that equal a particular value - For example If I open a form and 20 of the 25 Records in the Town Field = Glasgow, how would I put that into the Control Sourse box to return the result??

All suggestions are greatly appreciated !
 
Dcount("[Field Name]","table/query","[Field Name] = 'Glasgow'")

Of course it is more common practise to have the Glasgow in some other object on the form such as a text box or combo box in which case it would be:

Dcount("[Field Name]","table/query","[Field Name] = [Textbox/Combo]")
 
Still Not Working!

Thanks for the tip but it's not working.

Here's what I've entered - have I done someething wrong???

Here's my entry

DCount("[FinanceCoName]","qryalldeals","[FinanceCoName] = 'Paragon'")

Sorry to be a pain

Andy
 
Forgot to put the = sign before it - Doh!!

It's working now - many thanks
 
Works but doesn't

I have put this formula into my control source. And it counts the number of Yes's in a record as it should. But the number does not change when I move to a new record. Is it the same as the number in the 1st record. What am I doing wrong?
 

Users who are viewing this thread

Back
Top Bottom