469,317 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Error: Database engine does not recognize... as a valid field name or expression

Question from a Novice:

I have a Query which is based on a Crosstab Query. One of the fields in the Query is "Client". I can "hardcode" a Criteria for the "Client" field and the Query works fine. For example: Left([Client],1)="A", or "AMG" both return all the rows where Client = "AMG".

Obviously, I would prefer to use a variable for the Criteria such as [TempVars]![ClientName]. But whenever I try that (when a Crosstab Query is the source of the Query), I get following error message:

"The Microsoft Access database engine does not recognize '[TempVars]![ClientName]' as a valid field name or expression.

Simple queries based on a table or based another another simple query have no errors when I use a variable for the Client field Criteria.

Any suggestions for getting my Query to handle a variable for the Client field criteria - when my Query is based on a Crosstab Query?

I'm stuck!
Mar 27 '12 #1
1 3453
NeoPa
32,173 Expert Mod 16PB
I'm confused by what you mean by a variable Paul. [TempVars]![ClientName] is none such. It's a reference to a field.

I'm very inexperienced with Crosstabs myself, but it would seem sensible to post the SQL anyway and possibly try to explain what you want again with reference to what's there.
Mar 27 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by NerdRunner | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.