Cross tab queries

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I get the following error whenever I try and run a query
based on a value from a form.

The Microsoft Jet database engine does not
recognize '[Forms]![F_Fact_Pack]![txtReportEnd]' as a
valid field name or expression.

The formula I am using is <(DateValue([Forms]!
[F_Fact_Pack]![txtReportEnd])+1). I use this formula or
similar formula in several hundred queries, and they work
well, it just fails in the crosstab query.

Can anyone tell me how I can write criteria for a
crosstab query that is based on a form?

Thank you in advance.

Mark
 
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
[Forms]![F_Fact_Pack]![txtReportEnd]
Select the data type of the parameter in column 2
DateTime
 
John,

Thank you very much. This approach certainly is better
than creating a table and basing the cross tab on that.

Have a great day.

Mark
-----Original Message-----
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
[Forms]![F_Fact_Pack]![txtReportEnd]
Select the data type of the parameter in column 2
DateTime
I get the following error whenever I try and run a query
based on a value from a form.

The Microsoft Jet database engine does not
recognize '[Forms]![F_Fact_Pack]![txtReportEnd]' as a
valid field name or expression.

The formula I am using is <(DateValue([Forms]!
[F_Fact_Pack]![txtReportEnd])+1). I use this formula or
similar formula in several hundred queries, and they work
well, it just fails in the crosstab query.

Can anyone tell me how I can write criteria for a
crosstab query that is based on a form?

Thank you in advance.

Mark
.
 
Back
Top