crisis2007
Technical User
This is driving me nuts! I cannot find what is wrong here. I have a crosstab query that works fine. I designed a report whose data comes from the same query that works if I have no parameters set to it. But when I put parameters in the query - the query itself works, but when I generate the report, I get the error message, "The Microsoft Jet database engine does not recognize " as a valid field name or expression."
The parameters are based on a form. But it does not seem to matter how I do this, it refuses to work on the report giving me the same error. Anyone have an idea on how to fix this? Here is my query in the event it helps:
PARAMETERS [Forms]![F_ExceptionTotal]![txtStartDate] DateTime, [Forms]![F_ExceptionTotal]![txtEndDate] DateTime;
TRANSFORM Sum(T_Exception.Hours) AS SumOfHours
SELECT T_Exception.EmployeeNumber
FROM T_Exception INNER JOIN T_Employee ON T_Exception.EmployeeNumber = T_Employee.EmployeeNumber
WHERE (((T_Employee.CostCenter)=6470) AND ((T_Exception.TDate) Between [Forms]![F_ExceptionTotal]![txtStartDate] And [Forms]![F_ExceptionTotal]![txtEndDate]))
GROUP BY T_Exception.EmployeeNumber, T_Employee.Last, T_Employee.CostCenter
ORDER BY T_Employee.Last
PIVOT T_Exception.Exception;
The parameters are based on a form. But it does not seem to matter how I do this, it refuses to work on the report giving me the same error. Anyone have an idea on how to fix this? Here is my query in the event it helps:
PARAMETERS [Forms]![F_ExceptionTotal]![txtStartDate] DateTime, [Forms]![F_ExceptionTotal]![txtEndDate] DateTime;
TRANSFORM Sum(T_Exception.Hours) AS SumOfHours
SELECT T_Exception.EmployeeNumber
FROM T_Exception INNER JOIN T_Employee ON T_Exception.EmployeeNumber = T_Employee.EmployeeNumber
WHERE (((T_Employee.CostCenter)=6470) AND ((T_Exception.TDate) Between [Forms]![F_ExceptionTotal]![txtStartDate] And [Forms]![F_ExceptionTotal]![txtEndDate]))
GROUP BY T_Exception.EmployeeNumber, T_Employee.Last, T_Employee.CostCenter
ORDER BY T_Employee.Last
PIVOT T_Exception.Exception;