Troubleshooting DCount function

daniel_in_korea

Registered User.
Local time
Tomorrow, 04:31
Joined
Jun 21, 2005
Messages
11
Hello,
I would like to insert a DCount function in an unbound textbox in a form to count all records in a query. My current code in the textbox is: '=DCount("*","Query1")'. The Query 'Query1' depends on two parameters, which has to be entered before opening the query. The result is '#Error', if 'Query1' is open or not.
Thanks for your help.
 
Hello Daniel!
Look at "DemoDCountA2000.mdb".
I don't know why do you need it, because you have this
data in form, right of navigations buttons.
 

Attachments

Thanks MStef, but unfortunately I do not understand, what you mean. Neither can I understand, how the number of records can be counted in the example database. By the way, the query I would like to count the records in is not the query the data for the form comes from.
Could you please explain it again.
Thank you
 
Do you hand type your parameter values or are they reference from a form control?
 
Rather then [Enter Parameter Value] put [Forms]![FormName]![ControlName]
 

Users who are viewing this thread

Back
Top Bottom