VBA code to count the total number of cases done by each user

aman

Registered User.
Local time
Today, 15:04
Joined
Oct 16, 2008
Messages
1,251
Hi All

I have designed a project in Access and now I want to design MI Report. There are two tables tbldata,tblmain in Access database.

when the user selects Date from combobox then I want to display total number of cases processed by each user from both tables tbldata and tblmain.

Can anyone please give me the code so that it looks for both tables tbldata and tblmain and then display the number of cases done by each user for a particulat date.

Thanks
 
SELECTing counts is best done in SQL, and the resulting recordset used as the record source for a report. That SQl looks like this:

SELECT COUNT(*) AS CasesProcessed, UserID FROM tablename
WHERE DateColumn = some inputted date variable
GROUP BY USERID

Which will give:

UserID CasesProcessed
1 7
2 15
4 6
 

Users who are viewing this thread

Back
Top Bottom