472,133 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

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 3852
NeoPa
32,497 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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.