Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Based on Crosstab Query Gives Error Message 1

Status
Not open for further replies.

crisis2007

Technical User
Apr 2, 2007
114
US
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;
 
You haven't told us if you are using any "crosstab" specific solution such as code or other.

The first task I would do is to enter all possible column headings into the Column Headings property of the crosstab.

Duane
Hook'D on Access
MS Access MVP
 
Thank You!!
I forgot to enter the column headings into the Column Headings property. That did the trick! Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top