PDA

View Full Version : Solved: Get the count of records generated in the query



kbsudhir
09-20-2009, 09:12 PM
Hi All,

I am using Access 2003. I am using DoCmd to run a query on a button click on the Access 2003.
It opens a datasheet. I want to stop that also get the count of the records in a textbox.

I changed teh query to get count using the Count clause. Now it displays the count in the datasheet but not in the textbox.

I have already choosen that particular query as the source for that textbox but I only get "Name#?" in th textbox.

Please guide.

:help :dunno :dunno : pray2:

Thanks
Sudhir

CreganTur
09-21-2009, 06:56 AM
In VBA you can use the DCount function to count the records in the query.

kbsudhir
09-22-2009, 04:01 PM
Thanks Randy, its done.

:bow: :bow: :bow: :bow: