Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Query criteria and Crosstab 3

Status
Not open for further replies.

dawnd3

Instructor
Joined
Jul 1, 2001
Messages
1,153
Location
US
Hi there,

I have a crosstab query that is built on a union query that is built on a series of other queries. It all worked great until I put a criteria in one of the underlying queries to filter the date based on the user input.

I have in the criteria field for the date:

>=[forms]![frmConfig]![dtmBegDate] And <=[forms]![frmConfig]![dtmEndDate]

This is the exact error message I get:

The microsoft jet engine does not recognize >=[forms]![frmConfig]![dtmBegDate] as a valid field name or expression.

This ONLY happens when I run the crosstab, all of the other queries still work with this filter.

Thanks for your help,

Dawn

 
I think that you need to use Like before your criteria
>=[forms]![frmConfig]![dtmBegDate] And <=[forms]![frmConfig]![dtmEndDate]
 
Crosstab queries require that you specify the data type of all parameters. Select Query|Parameters and enter
[forms]![frmConfig]![dtmBegDate] Date/Time
[forms]![frmConfig]![dtmEndDate] Date/Time

Duane
MS Access MVP
 
Duane, just to clarify, do I put this in the original query (the first query that leads to the crosstab) in the criteria for the date? Like this?

>= [forms]![frmConfig]![dtmBegDate] Date/Time AND <= [forms]![frmConfig]![dtmEndDate] Date/Time

It is telling me that the expression contains an invalid syntax. What am I doing wrong?

Dawn

 
You already have your criteria set correctly. You need to select query|parameters from the menu and enter what I suggested earlier. I think you can do this in either the select query or the crosstab query.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top