MS Access Crosstab/Parameter Queries - TechRepublic
General discussion
March 12, 2009 at 07:23 AM
juddly

MS Access Crosstab/Parameter Queries

by juddly . Updated 17 years, 3 months ago

I’m writing a crosstab query but I want the user to input the date. In a simple SELECT query, you simply say, “WHERE Date = [ENTER DATE].” However, in an equivalent Crosstab Query, I get the error, “The Microsoft Jet Engine does not recognize [ENTER DATE] as a valid field name or expression.”
What is different about pivot queries? Any work-arounds? I’ve tried putting the user-entry parameter in a sub-query with the same result.

TRANSFORM Sum(m.Monthly_Total) AS Total
SELECT m.division
FROM tbl_Mthly_Data AS m
WHERE m.as_of_date=[enter date:]
GROUP BY m.division
PIVOT m.as_of_date;

This discussion is locked

All Comments