Crosstab Query

C

Chris

All,

I have a form (frmFrontEnd) with a combobox (location) the
address of which is [forms]![FrmFrontEnd]![location].

I aslo have a cross tab query which I want to filter to
results for just the location specified in the combobox.

I have used the Expression builder to put the criteria of
[forms]![FrmFrontEnd]![location] into the location field
for the crosstab query. When I run the query Access tells
me that it does not recognise [forms]![FrmFrontEnd]!
[location] as a valid filed name or expression. I don't
get this error when I use the combobox as a filter on
standard queries!

What is going wrong, or how else can I use the value in
the combobox to act as a filter on a crosstab query?

TIA,

Chris
 
D

Duane Hookom

Crosstabs require you to explicitly datatype your parameters. Select
Query|Parameters and enter:
[forms]![FrmFrontEnd]![location] Text (or other data type)
 
C

Chris

Thanks Duane,

I would have never have spotted that. You've just saved
me hours of time, thanks


Chris :)

-----Original Message-----
Crosstabs require you to explicitly datatype your parameters. Select
Query|Parameters and enter:
[forms]![FrmFrontEnd]![location] Text (or other data type)

--
Duane Hookom
MS Access MVP


All,

I have a form (frmFrontEnd) with a combobox (location) the
address of which is [forms]![FrmFrontEnd]![location].

I aslo have a cross tab query which I want to filter to
results for just the location specified in the combobox.

I have used the Expression builder to put the criteria of
[forms]![FrmFrontEnd]![location] into the location field
for the crosstab query. When I run the query Access tells
me that it does not recognise [forms]![FrmFrontEnd]!
[location] as a valid filed name or expression. I don't
get this error when I use the combobox as a filter on
standard queries!

What is going wrong, or how else can I use the value in
the combobox to act as a filter on a crosstab query?

TIA,

Chris


.
 
Top