crosstab query problem

  • Thread starter Michael S. Montoya
  • 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?????
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top