F
Flopbot
John,
It worked perfectly! Thank you so much for your help. You’ve been a great
teacher and really, really patient! You taught me an awfully lot about
Access and I am truely grateful.
Thank you!
Chris H.
It worked perfectly! Thank you so much for your help. You’ve been a great
teacher and really, really patient! You taught me an awfully lot about
Access and I am truely grateful.
Thank you!
Chris H.
John W. Vinson said:OK, thank you for hanging in there!
SELECT [Volunteer Hours Tracking Table].[Volunteer ID],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS Total
FROM [Volunteer Hours Tracking Table]
WHERE ((([Volunteer Hours Tracking Table].[Date
Worked])>DateAdd("yyyy",-1,Date())))
GROUP BY [Volunteer Hours Tracking Table].[Volunteer ID], [Volunteer Hours
Tracking Table].[Number of People], [Volunteer Hours Tracking Table].[Start
Time], [Volunteer Hours Tracking Table].[End Time];
It sounds like you're grouping by the Start Time and End Time rather than just
summing them. Try
SELECT [Volunteer Hours Tracking Table].[Volunteer ID],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS Total
FROM [Volunteer Hours Tracking Table]
WHERE
((([Volunteer Hours Tracking Table].[Date Worked])>DateAdd("yyyy",-1,Date())))
GROUP BY [Volunteer Hours Tracking Table].[Volunteer ID];
if you want the sums to be just over volunteerID.