I am trying to group in a report based on date in "mmmm yyyy" format. The original date format is "mm/dd/yyyy". I created a crosstab query to show many times each code occurred during each month (dates are determined by parameters, so the codes are the column headings and the dates are the row headings).
The problem I'm having is that if code 21 occurred 1 time in july 05 and code 22 occurred 2 times in july 05, then there will be 3 rows for july 05.
Here is the statement for my crosstab query:
In my report in Sorting and Grouping, I have the date grouped on month, but yet, there are still multiple rows for each month.
Could this possibly be a problem with my join in the query that the crosstab query is based upon? Here is the statement for that query:
Please, any help is appreciated!!!
Rgds,
Kmkland
The problem I'm having is that if code 21 occurred 1 time in july 05 and code 22 occurred 2 times in july 05, then there will be 3 rows for july 05.
Here is the statement for my crosstab query:
Code:
PARAMETERS [Forms]![frmParameters]![StartDate] DateTime;
TRANSFORM Count(qryTtlAbs_Count.[EmpFile#]) AS [CountOfEmpFile#]
SELECT qryTtlAbs_Count.Date_of_Absence, Count(qryTtlAbs_Count.[EmpFile#]) AS [Total Of EmpFile#]
FROM qryTtlAbs_Count
WHERE (((qryTtlAbs_Count.Date_of_Absence) Between [Forms]![frmParameters]![StartDate] And Date()))
GROUP BY qryTtlAbs_Count.Date_of_Absence
ORDER BY qryTtlAbs_Count.Date_of_Absence
PIVOT qryTtlAbs_Count.[Absence Code];
Could this possibly be a problem with my join in the query that the crosstab query is based upon? Here is the statement for that query:
Code:
SELECT tblEmpInfo.[EmpFile#], tblAbsences.Date_of_Absence, [tblAbsences]![Code] & ' ' & [tblReasonsForAbsences]![Reasons_for_Absences] AS [Absence Code]
FROM tblEmpInfo INNER JOIN (tblAbsences INNER JOIN tblReasonsForAbsences ON tblAbsences.Code = tblReasonsForAbsences.Code) ON tblEmpInfo.[EmpFile#] = tblAbsences.[EmpFile#]
WHERE (((tblAbsences.Code)="21" Or (tblAbsences.Code)="22" Or (tblAbsences.Code)="23"))
ORDER BY tblAbsences.Date_of_Absence;
Please, any help is appreciated!!!
Rgds,
Kmkland