Calculating record count

davesmith202

Employee of Access World
Local time
Today, 18:52
Joined
Jul 20, 2001
Messages
522
I have a Switchboard where I want to have 3 values displayed, which are the results of 3 separate queries combinations.

#1 is based on Query A2 which is base on Query A1 based on Table A

#2 is based on Query B2 which is base on Query B1 based on Table B

#3 is based on Query C2 which is base on Query C1 based on Table C

The Form is to display the record counts Query A2, B2 and C2.

How can I do this in code?

Thanks,

Jon
 
I would use the DCount() command

TotalA = DCount("*","A2")
TotalB = DCount("*","B2")
TotalC = DCount("*","C2")

David
 
Look at "currentdb.openrecordset" with this you will be able to open your query in code and do what ever you want with it....
 
Is using DCount too slow? Is using some other method faster?
 
It depends on what your underlying queries are doing.

David
 

Users who are viewing this thread

Back
Top Bottom