Criteria in crosstab query

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

Hi! I am trying to use the following criteria in a
crosstab query: IIf([forms]![frmDistributionReports]!
[Gender]=1,"M","F") and Access is telling me that the jet
engine doesn't recognize forms!frmDistributionReports!
Gender as a valid field or expression, yet when I go into
the Immediate window it returns the value of 1 for that
field. Help?
Mary
 
First thing, with a crosstab query you MUST declare your parameters and if any
other queries are used in the crosstab their parameters must also be declared.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Forms!frmDistributionReports!Gender
Select the data type of the parameter in column 2
Integer???
 
Back
Top