Crosstab Query with Criteria

G

Guest

I have a crosstab query that has 3 select queries that run before the data
reaches the crosstab. I am trying to set the criteria of 3 different fields
in the select queries to filter some of the data before it gets to the
crosstab. I am using an unbound form with unbound controls to set the values
of the criteria in the select queries. Example
Forms![BatchTotalsFilter]![PostedFilter]. Everything works fine until the
data reaches the crosstab query. This is the error message. The Microsoft
Jet Database engine does not recognize
Forms![BatchTotalsFilter]![PostedFilter] as a valid field name or expression.
Everything works fine until it reaches the crosstab query. Please advise.
 
J

John Spencer

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
Select the data type of the parameter in column 2

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

I did some more research after I posted this question and found out that
parameter had to be declared. Thank you for the help.

John Spencer said:
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
Select the data type of the parameter in column 2

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Ryan Tisserand said:
I have a crosstab query that has 3 select queries that run before the data
reaches the crosstab. I am trying to set the criteria of 3 different
fields
in the select queries to filter some of the data before it gets to the
crosstab. I am using an unbound form with unbound controls to set the
values
of the criteria in the select queries. Example
Forms![BatchTotalsFilter]![PostedFilter]. Everything works fine until the
data reaches the crosstab query. This is the error message. The
Microsoft
Jet Database engine does not recognize
Forms![BatchTotalsFilter]![PostedFilter] as a valid field name or
expression.
Everything works fine until it reaches the crosstab query. Please advise.
 

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

Top