Ok I have a tbl with the following fields:
Name
Date
Activity
Hours
I have a form with these fields on it and two additional fields:
Total Hours
Hours this Month
Those fields need to do just what they say, calculate the total hours and calculate total hours for the current month only.
Here is the code that I have thus far, that is not working:
SELECT tblVolunteers.Date, tblVolunteers.Name, Sum(tblVolunteers.Hours) AS tot
FROM tblVolunteers
GROUP BY tblVolunteers.Date, tblVolunteers.Name
HAVING (((tblVolunteers.Date)=Month(Now())))
ORDER BY tblVolunteers.Name;
If I take out the "=Month(Now)) portion I can get the total hours, so that part is done, I just figured that out..... I get nothing back on the above sql statement.
What am I missing?
Chuck
Name
Date
Activity
Hours
I have a form with these fields on it and two additional fields:
Total Hours
Hours this Month
Those fields need to do just what they say, calculate the total hours and calculate total hours for the current month only.
Here is the code that I have thus far, that is not working:
SELECT tblVolunteers.Date, tblVolunteers.Name, Sum(tblVolunteers.Hours) AS tot
FROM tblVolunteers
GROUP BY tblVolunteers.Date, tblVolunteers.Name
HAVING (((tblVolunteers.Date)=Month(Now())))
ORDER BY tblVolunteers.Name;
If I take out the "=Month(Now)) portion I can get the total hours, so that part is done, I just figured that out..... I get nothing back on the above sql statement.
What am I missing?
Chuck