By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

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

P: 22
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
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,419
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.