Daily Attendance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a report that displays daily attendance with 31 days across
top
like so:
Name: 1 2 3 4 5 6 7 8 .....
Carl X X X X X X X X
Sue X X X X
 
It will be different if you collect your data differently. In this one I am
collecting the data like this --
Name Present_Date
John 5/14/2006
Sue 5/14/2006
Bill 5/14/2006
John 5/15/2006
Bill 5/15/2006
Sue 5/16/2006
John 5/16/2006

TRANSFORM First(IIf([Name] Is Null,Null,"X")) AS x
SELECT AttendanceTable.Name
FROM AttendanceTable
WHERE (((Format([Present_Date],"yyyymm"))=Format(DateAdd("m",-Val([Enter 0
for this month or 1 for last month]),Date()),"yyyymm")))
GROUP BY AttendanceTable.Name
PIVOT Val(Format([Present_Date],"d")) In (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31);

You have a choice to see this month's data or last depending on your
response to the prompt.
 
Back
Top