F
Flopbot
I think that I’m missing something really easy here. I have a query drawn
from an “Volunteer Hours Tracking Table†that returns the total number of
hours worked by those volunteers who came in during the past month. To do
this it uses the equation: (Sum((DateDiff("n",[Start Time],[End
Time])/60)*[Number of People])) I have since added another field to the
original table labeled [Other Hours]. I want to ADD the [Other Hours] field
to my original equation in this query. I’ve already done it on my main form
but haven’t been able to do it in my query.
Can anyone see the error of my ways?
SQL View:
SELECT [Volunteer Hours Tracking Table].[Volunteer ID],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS Total
FROM [Volunteer Info Table] INNER JOIN [Volunteer Hours Tracking Table] ON
[Volunteer Info Table].[Volunteer ID] = [Volunteer Hours Tracking
Table].[Volunteer ID]
WHERE ((([Volunteer Hours Tracking Table].[Date
Worked])>DateAdd("m",-1,Date())))
GROUP BY [Volunteer Hours Tracking Table].[Volunteer ID], [Volunteer Hours
Tracking Table].[Other Hours];
from an “Volunteer Hours Tracking Table†that returns the total number of
hours worked by those volunteers who came in during the past month. To do
this it uses the equation: (Sum((DateDiff("n",[Start Time],[End
Time])/60)*[Number of People])) I have since added another field to the
original table labeled [Other Hours]. I want to ADD the [Other Hours] field
to my original equation in this query. I’ve already done it on my main form
but haven’t been able to do it in my query.
Can anyone see the error of my ways?
SQL View:
SELECT [Volunteer Hours Tracking Table].[Volunteer ID],
(Sum((DateDiff("n",[Start Time],[End Time])/60)*[Number of People])) AS Total
FROM [Volunteer Info Table] INNER JOIN [Volunteer Hours Tracking Table] ON
[Volunteer Info Table].[Volunteer ID] = [Volunteer Hours Tracking
Table].[Volunteer ID]
WHERE ((([Volunteer Hours Tracking Table].[Date
Worked])>DateAdd("m",-1,Date())))
GROUP BY [Volunteer Hours Tracking Table].[Volunteer ID], [Volunteer Hours
Tracking Table].[Other Hours];