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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Howarth
    New Member
    • Dec 2010
    • 22

    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!
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    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.

    Comment

    Working...