Counting Records from Multiple Tables Again...

merciless32

Registered User.
Local time
Today, 18:59
Joined
Mar 4, 2002
Messages
48
OK...here goes nothing...

I have 3 tables that contain a field named "Status", (Table_1, Table_2, Table_3). The code in the Status field will be an "A" for new records, "B" for records returned for questions, and "C" for closed records.

How do I use DCount to track the combined daily record totals for all 3 tables based on the Status field?

Thanks in advance.
 
You could create a UNION ALL query on the three tables and use that in your DCOUNT.
You could DCOUNT("YNField","Table1","YNField=True") + DCOUNT("YNField","Table2","YNField=True") + DCOUNT("YNField","Table3","YNField=True")
There must be 2 or 3 more variations of the above like a union all query that counts for you, etc.
 
ok...

Thanks for the help, but I'm not getting what I need to see out of this.

I really need to be able to count the number of "A"s in all the tables and then post that total in a field on a form. Then the "B"s total n a seperate field. And finally the "C"s total in another field.
 
Right, hence the plus sign to ADD the Dcounts together in one field.
 

Users who are viewing this thread

Back
Top Bottom