I am trying to summaries daily attendance table (tblTimeLog) to create Monthly attendance data (tblMonthRecord) where through query; Fields like Overtime, Late, Number of days Present are calculated. There is a column named Holiday_In where Sunday Entries were recorded. Now I also like to count the number of sundays worked. But It is not working. Everytime I got only zeros.
Query is:
Code:
SELECT First(tblTimeLog.[LogDate]) AS FirstDay, tblTimeLog.NAME, Sum(CDate([OT])) AS Sum_OT, Sum(CDate([LATE])) AS Sum_LATE, Sum(CDate([E_ARRIVAL])) AS Sum_E_ARRIVAL, Sum(CDate([L_DEPT])) AS Sum_L_DEPT, Sum(CDate([L_IN])) AS Sum_L_IN, Sum(CDate([E_DEPT])) AS Sum_E_DEPT, Count(tblTimeLog.[LogDate]) AS DayCount, tblTimeLog.EM_ID, Count(tblTimeLog.HOLIDAY_IN) AS NumberOfSundays
FROM tblTimeLog
WHERE (((tblTimeLog.OT)>"0") AND ((tblTimeLog.LATE)>"0"))
GROUP BY tblTimeLog.NAME, tblTimeLog.EM_ID
tblTimeLog Data Sample:
Hope some body will fine me with the solution thank you..