SQL to Variable - Help Me Please

napjones

New member
Local time
Today, 03:13
Joined
Oct 5, 2005
Messages
7
I have written the code for an SQL statement to count the number of active employees in a table, I now need this information stored in a variable so I can then put it in a label for a report like form. I have no idea how to do this please help
 
You don't need to use SQL to do this. Check in Help for the DCount() function.
 
If you have a query, you can also use DLOOKUP to return the query value, or convert your query to use DCOUNT, either will work. I will sometimes the count query and DLOOKUP if the query is rather complexe for DCOUNT.
 

Users who are viewing this thread

Back
Top Bottom