filter crosstab query by listbox selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I might have just posted this, but i'm not sure it went through.


My problem is that Access does not recognize my criteria as a valid
expression. I have a crosstab query, presented in a listbox, that will not
filter according to a selection made in a previous listbox. Instead, it
gives me an error message telling me it does not recognize my criteria (which
is in correct form) as a valid expression.

This is confusing, because i have a nother list box that presents the
results in a listbox and in a normal fashion with the same criteria, and it
works fine.

Any help or suggestions???
 
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

So if you are using something like
[Forms]![YourFormName]![YourControlName]

You need to put that into column 1 of the parameter dialog window and then
select its data type in column 2.
 
Thanks, it worked...



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

So if you are using something like
[Forms]![YourFormName]![YourControlName]

You need to put that into column 1 of the parameter dialog window and then
select its data type in column 2.


polisci grad said:
I might have just posted this, but i'm not sure it went through.


My problem is that Access does not recognize my criteria as a valid
expression. I have a crosstab query, presented in a listbox, that will
not
filter according to a selection made in a previous listbox. Instead, it
gives me an error message telling me it does not recognize my criteria
(which
is in correct form) as a valid expression.

This is confusing, because i have a nother list box that presents the
results in a listbox and in a normal fashion with the same criteria, and
it
works fine.

Any help or suggestions???
 
Back
Top