DCount with group and date params

jedder18

Just Livin the Dream!
Local time
Today, 07:14
Joined
Mar 28, 2012
Messages
135
SELECT qryHoursReq.VolunteerId, qryHoursReq.Name, qryHoursReq.Program, Sum(qryHoursReq.Total_Time) AS SumOfTotal_Time, qryHoursReq.S_date
FROM qryHoursReq
GROUP BY qryHoursReq.VolunteerId, qryHoursReq.Name, qryHoursReq.Program, qryHoursReq.S_date
HAVING (((qryHoursReq.S_date) Between [startdate] And [enddate]));


This is my query

I'm trying to get a count of distinct volunteerID in an unbound textbox on report.

If I use =Count(*) I get 2 when I put in date parameters and it groups by program
This is kind of correct, but, these 2 are the same person, she had different days she participated.

What code can I use for only get a count of 1

FOrgot to mention, when I use the DCount with numerous examples, I get #Error


Thanks for any and all help.
 
To do that, you would have to DCount into this query:

Code:
SELECT qryHoursReq.Name
FROM qryHoursReq
GROUP BY qryHoursReq.Name
HAVING (((qryHoursReq.S_date) Between [startdate] And [enddate]));
 
Awesome...got it working...

Thanks...
 

Users who are viewing this thread

Back
Top Bottom