Reputation: 910
I have a query that used a field from a form as a parameter in a crosstab query and it worked fine, the contents of the field are like 2017-18 etc. But now I have 2 forms that run the same query and have used TempVars, I have dim/defined the TempVars in the VBA before the query launches and have used the following as a parameter in the query;
[Tempvars]![varFinDate]
But when the query runs I get the error message;
The expression is typed incorrectly, or is too complex to be evaluated. For example, a numeric express may contain too many complicated elements. Try simplifying the expression by assigns parts of the express to variables.
I have used the same principle on many queries without issue.
Upvotes: 1
Views: 202
Reputation: 1626
A crosstab has to have the parameters predefined. Have you declared the parameters in the crosstab query?
If not you can set them in the Query editor by right click and select Parameters property in the designer.
Upvotes: 2