Hi,
I have a table staffDetails with field staffID(among many other fields!). I have another table :tblISS which has fields: staffID and sessionDate.
I have created a query based on tblISS which has fields: tblISS.StaffID(group by), sessionCount(count StaffID), xPeriod(group by) and tblISS.sessionDate(group by, asending, not shown).
xPeriod = getPeriod(sessionDate) - this is a call to a custom function that works out the year period for the given sessionDate and returns a string value such as "2001/2002"
This all works fine and gives me a count for the number of sessions attended by each member of staff for each xPeriod(but only for those members of staff that actually attented a session in the given xPeriod).
The problem is that i need to show count results for each member of staff from tblStaffDetails, so if they didn't attend any sessions in a given xPeriod then the query should show 0 for count for that xPeriod. So basically for each xPeriod each staffName in tblStaffDetails should be displayed in the query results with a count value of 0(if staff did not attend a session in that year) or 1 or more for those that did attend.
Any ideas would be appreciated.
Thanks Dan
I have a table staffDetails with field staffID(among many other fields!). I have another table :tblISS which has fields: staffID and sessionDate.
I have created a query based on tblISS which has fields: tblISS.StaffID(group by), sessionCount(count StaffID), xPeriod(group by) and tblISS.sessionDate(group by, asending, not shown).
xPeriod = getPeriod(sessionDate) - this is a call to a custom function that works out the year period for the given sessionDate and returns a string value such as "2001/2002"
This all works fine and gives me a count for the number of sessions attended by each member of staff for each xPeriod(but only for those members of staff that actually attented a session in the given xPeriod).
The problem is that i need to show count results for each member of staff from tblStaffDetails, so if they didn't attend any sessions in a given xPeriod then the query should show 0 for count for that xPeriod. So basically for each xPeriod each staffName in tblStaffDetails should be displayed in the query results with a count value of 0(if staff did not attend a session in that year) or 1 or more for those that did attend.
Any ideas would be appreciated.
Thanks Dan