Counting number of records found in queries.

uplink600

Registered User.
Local time
Today, 17:03
Joined
Mar 18, 2004
Messages
69
Hi

I have to calculate the quantity of records that are found each time a query is run. This information is displayed on a form that details statistics on my database. I can do this by creating a new query and adding a total field with the following expression......

Total: Count([Record Number])

Record Number is just the field I use from the main table to get my total.

The problem is I don't want to create a new query for each of my main queries as this amounts to 12, giving a total of about 24 queries. How can I obtain the quantity of records for all my main queries just using the one query as above?

Hope this makes sense.
 
To show the number of records returned by a query, you can use the DCount() function.

Put a text box on the form. Put this in the Control Source property of the text box (using the correct query name):-

=DCount("*","queryName")
 
Works fine

Thanks

VC
 

Users who are viewing this thread

Back
Top Bottom