Hello,
I want to use a subform with master and child link as StudentID and the purpose is to get student attendance status in each month. I'm using following query but it is not working as required. I don't know where is wrong. Can anybody guide me how can I get Attendance status of a student in each month. Attendance status are 1,2, and 3 for present, absent and on leave repsectively.
Best Regards,
Abdullah
I want to use a subform with master and child link as StudentID and the purpose is to get student attendance status in each month. I'm using following query but it is not working as required. I don't know where is wrong. Can anybody guide me how can I get Attendance status of a student in each month. Attendance status are 1,2, and 3 for present, absent and on leave repsectively.
SQL:
SELECT tblAttendance.StudentID, Month([attDate]) AS expAttMonth, Count([attStatus]=1) AS expPresent, Count([attStatus]=2) AS expAbsent, Count([attStatus]=3) AS expLeave
FROM tblAttendance
GROUP BY tblAttendance.StudentID, Month([attDate]);
Best Regards,
Abdullah