It looks to me that you are committing "Spreadsheet". You seem to be creating your structure based on what the output looks like instead of a normalized structure.
From your query, I created this table structure.
Attachment 2690
From the table structure, I came up with this query:
Code:
SELECT Sum(Abs(nz([SDay1],"")="X")) AS D1, Sum(Abs(NZ([SDay2],"")="X")) AS D2, Sum(Abs(NZ([SDay3],"")="X")) AS D3, Sum(Abs(NZ([SDay4],"")="X")) AS D4, Sum(Abs(NZ([SDay5],"")="X")) AS D5, Sum(Abs(NZ([SDay6],"")="X")) AS D6, Sum(Abs(NZ([SDay7],"")="X")) AS D7
FROM tblSelectedDays INNER JOIN tblEmployeeSchedules ON tblSelectedDays.SelectedDaysID = tblEmployeeSchedules.SelectedDaysID
HAVING (((tblEmployeeSchedules.StartDate)>=#1/1/2011#) AND ((tblEmployeeSchedules.EndDate)<=#1/31/2011#));
The date fields in the table "tblEmployeeSchedules" appear to be the start and end dates for a month.
Although I know little about your project, I would suggest a table structure something like:
Attachment 2691
Good luck