I get this message...:
...whenever I run my crosstab query:
I am not quite sure where the problem lies.
The crosstab query is based upon this query:
...which works just fine.
This is the base query:
Please, any advice on this matter will be greatly appreciated!!!
Thanks in advance!
Rgds,
Kmkland
Code:
This expression is typed incorrectly, or it is too complex to be evaluated...Try simplifying the expression by assigning parts of the expression to variables.
Code:
PARAMETERS [Forms]![frmParameters]![StartDate] DateTime, [Forms]![frmParameters]![EndDate] DateTime;
TRANSFORM Count(qryCountAbsOuterJoin2.[CountOfEmpFile#]) AS [CountOfCountOfEmpFile#]
SELECT qryCountAbsOuterJoin2.Date_of_Absence, Count(qryCountAbsOuterJoin2.[CountOfEmpFile#]) AS [Total Of CountOfEmpFile#]
FROM qryCountAbsOuterJoin2
WHERE (((qryCountAbsOuterJoin2.Date_of_Absence) Between [Forms]![frmParameters]![StartDate] And [Forms]![frmParameters]![StartDate]))
GROUP BY qryCountAbsOuterJoin2.Date_of_Absence
PIVOT qryCountAbsOuterJoin2.[Absence Code];
The crosstab query is based upon this query:
Code:
SELECT [tblReasonsForAbsences]![Code] & ' ' & [tblReasonsForAbsences]![Reasons_for_Absences] AS [Absence Code], Count([qryCountAbsJoin].[EmpFile#]) AS [CountOfEmpFile#], CDate(Format([qryCountAbsJoin].[Date_of_Absence],"mm/\1/yyyy")) AS Date_of_Absence
FROM tblReasonsForAbsences LEFT JOIN qryCountAbsJoin ON [tblReasonsForAbsences].[Code]=[qryCountAbsJoin].[Code]
GROUP BY [tblReasonsForAbsences]![Code] & ' ' & [tblReasonsForAbsences]![Reasons_for_Absences], [qryCountAbsJoin].[Date_of_Absence]
ORDER BY [qryCountAbsJoin].[Date_of_Absence];
This is the base query:
Code:
SELECT tblEmpInfo.[EmpFile#], tblEmpInfo.DeptCode, tblAbsences.Date_of_Absence, tblAbsences.Code
FROM (tblEmpInfo INNER JOIN tblHireDates ON tblEmpInfo.[EmpFile#] = tblHireDates.[EmpFile#]) INNER JOIN tblAbsences ON tblEmpInfo.[EmpFile#] = tblAbsences.[EmpFile#]
WHERE (((tblAbsences.Date_of_Absence) Is Null Or (tblAbsences.Date_of_Absence) Between [Forms]![frmParameters]![StartDate] And [Forms]![frmParameters]![EndDate]) AND ((tblHireDates.Date_of_Separation) Is Null))
ORDER BY tblAbsences.Date_of_Absence;
Please, any advice on this matter will be greatly appreciated!!!
Thanks in advance!
Rgds,
Kmkland