5 replies
by sl-campbell
It is possible to pass criteria to a Transform/Crosstab query, but not as a parameter as far as I know.
You can hard code the Transform Select statement, build a recordset and then pass assign the value of a text box or variable to the criteria in the WHERE section of the statement.
by amy123
by syscokid
I'm no Access expert but I did create a Crosstab query once that allowed me to pass a date parameter.
I don't remember exactly how I set it up in design view, but here's the SQL statement. Maybe you can modify it to suit your needs. (It's buggy, it prompts twice for dates).
PARAMETERS [#Begin Date MM/DD/YY#] DateTime, [#End Date MM/DD/YY#] DateTime;
TRANSFORM Count([YourTable].num) AS [The Value]
SELECT [YourTable].[YourField]
FROM [YourTable]
WHERE (((([YourTable].[Date])>=[BeginDate #MM\DD\YY#])<=[#End Date MM\DD\YY#]))
GROUP BY [YourTable].[YourRowField]
PIVOT [YourTable].[YourColumnField] In ("Value1","Value2","Value3","Value4");
by amy123
by amy123
This discussion is closed to new replies.
Trending Software posts
Sort by Trending