Error with Crosstab query

miracleman

Registered User.
Local time
Today, 07:00
Joined
Aug 9, 2007
Messages
10
I'm getting an error that [TempVars]![SelectedStaff] is not a valid field name or expression in a where clause in a crosstab query.
Can I use Tempvars as parameters in crosstab querys?
 
If TempVars is a form you have to tell access it is a form: Forms!TempVars
If it is a table you need to use the table in your query...

What is Tempvars?
 
Tempvars are variables that I'm defining in Access that should be accessible through the environment. I'm using them in a regular select query and they are working fine.
 
Well appearently they are not working here... You must have done something wrong....

Tempvars is not a default environment thing I am aware of. So it is a personaly build thing... How do other queries use it?
 
I don't know anything about TempVars, but I believe I had a similar problem when I neglected to explicitly define the data types of my parameters in a crosstab query.
Unlike select queries where you can simply reference a form control in the criteria row and run the query, I believe that crosstabs require you declare the data type for each parameter.

I don’t know what version of Access you’re using, but in 2007, you can define your parameters by opening the query in design view, and selecting “Parameters” from the “Show/Hide” group of the Design menu. Have you already tried that?
 

Users who are viewing this thread

Back
Top Bottom