crosstab query problem

  • Thread starter Thread starter Michael S. Montoya
  • Start date Start date
M

Michael S. Montoya

I have a crosstab query that works perfectly. If I have a field named
Gender and put a value in the Where of "M", the query only showes the males.
However, if I try and base the Where off a loaded form
"forms!frmReportFilter!txtGender" I get the message "Microsoft Jet Database
engine does not recognize '[forms]![frmReportFilter]!txtGender' as a valid
field name or expression.

I thought I could "beat" the system by filtering the query which the
crosstab is pulling from. The "source" query when run by itself is properly
filtered according to the value in txtGender, however, when I run the
crosstab query, it gives the same error!!!

Is there a way to filter a crosstab query at run time?????
 
Michael said:
I have a crosstab query that works perfectly. If I have a field named
Gender and put a value in the Where of "M", the query only showes the males.
However, if I try and base the Where off a loaded form
"forms!frmReportFilter!txtGender" I get the message "Microsoft Jet Database
engine does not recognize '[forms]![frmReportFilter]!txtGender' as a valid
field name or expression.

I thought I could "beat" the system by filtering the query which the
crosstab is pulling from. The "source" query when run by itself is properly
filtered according to the value in txtGender, however, when I run the
crosstab query, it gives the same error!!!

Is there a way to filter a crosstab query at run time?????


Sure. While Access can usually take care or query
parameters without your help, crosstab query's require you
to declare then parameters. Right click in the tables
portion of the query design window, select Parameters and
specify [forms]![frmReportFilter]!txtGender] and its type.
 
Back
Top