Query to count records in multiple queries

ramez75

Registered User.
Local time
Today, 00:34
Joined
Dec 23, 2008
Messages
181
Hi,

It seem straight forward but I am not sure if this is doable or if I am missing something.

I have 4 queries that pull information from the same table but each query have unique criteria.

I am trying to create one query that will count how many records each of the 4 queries has so that I can show it on a report.

QRYcount when executed will show me one row with 4 columns containing the count of records in each of the query as follows
QRY1 QRY2 QRY3 QRY4
35 10 200 4

Is that possible and if so how....any help or tip are greatly appreciated

Thanks in advance
 
I tried that in one of the reports fields and I get #Error.....

In this case I leave the Record Source BLANK for the REPORT.

What I did I have for fields on the report so I put in the Control source of each field in the report the below

=DCount("Ref No","qry1")

=DCount("Ref No","qry2")

=DCount("Ref No","qry3)

=DCount("Ref No","qry4")

What am I doing wrong
 
If you have spaces or special characters in the names then you must enclose them in square brackets, which is why most of us avoid them:

=DCount("[Ref No]","qry1")
 
If you have spaces or special characters in the names then you must enclose them in square brackets, which is why most of us avoid them:

=DCount("[Ref No]","qry1")


OOPs yep it worked...Thanks
 

Users who are viewing this thread

Back
Top Bottom