R
Rudy
I have several queries to keep track of hours and
overtime hours. However, I'd like a query that can track
overtime hours by the quarter. So that at the end of a
quarter I can track this value. I've been using the
IIf function to try. This is what I've tried.
OTHours: IIf([Sum Of Hours Worked]>'q yyyy',[Sum Of Hours
Worked]-'q yyyy',0)
Can you suggest an alternative that works
The returned suggestion was:
SELECT Format([WorkDate],"q yyyy") AS TheQtr, Sum
(HoursWorked) AS
SumOfHoursWorked
FROM YourTable
GROUP BY Format([WorkDate],"q yyyy");
However, I'm really not sure where/How to use this reply.
I entered the above in a new query using the SQL view.
Once entered it failed when I changed the YourTable to my
table called Time Sheet.
overtime hours. However, I'd like a query that can track
overtime hours by the quarter. So that at the end of a
quarter I can track this value. I've been using the
IIf function to try. This is what I've tried.
OTHours: IIf([Sum Of Hours Worked]>'q yyyy',[Sum Of Hours
Worked]-'q yyyy',0)
Can you suggest an alternative that works
The returned suggestion was:
SELECT Format([WorkDate],"q yyyy") AS TheQtr, Sum
(HoursWorked) AS
SumOfHoursWorked
FROM YourTable
GROUP BY Format([WorkDate],"q yyyy");
However, I'm really not sure where/How to use this reply.
I entered the above in a new query using the SQL view.
Once entered it failed when I changed the YourTable to my
table called Time Sheet.