G
Guest
Let's say we have a table in which one of the fields is Date. Now let's say
we want to create a simple report from that table, but the user has to pick
the date interval. So, the report will have to display records only from X
date to Y date. We create then a form called DateInput with 2 fields for the
user to input the X date and the Y date to create the interval. Then we make
a query from that table, and on the criteria of Date, we put the following
expression:
Between [Forms]![DateInput]![DateX] And [Forms]![DateInput]![DateY]
Well, that's what I've always done when I want to create a report based on a
date interval input by the user and it always worked.
But now I've got a problem. Instead of making a query, I made a crosstab
query from the table, to make the report easier to read. And again, on the
date criteria I put the same expression, but it won't work on the crosstab
query. I always get this error message:
"The Microsoft Jet database engine does not recognize
'[Forms]![Report]![DateX]' as a valid field name or expression."
Why does this expression work on a regular query but not on a crosstab query?
Also, any ideas on how to create this report on the date interval provided
by the user and using the crosstab query?
we want to create a simple report from that table, but the user has to pick
the date interval. So, the report will have to display records only from X
date to Y date. We create then a form called DateInput with 2 fields for the
user to input the X date and the Y date to create the interval. Then we make
a query from that table, and on the criteria of Date, we put the following
expression:
Between [Forms]![DateInput]![DateX] And [Forms]![DateInput]![DateY]
Well, that's what I've always done when I want to create a report based on a
date interval input by the user and it always worked.
But now I've got a problem. Instead of making a query, I made a crosstab
query from the table, to make the report easier to read. And again, on the
date criteria I put the same expression, but it won't work on the crosstab
query. I always get this error message:
"The Microsoft Jet database engine does not recognize
'[Forms]![Report]![DateX]' as a valid field name or expression."
Why does this expression work on a regular query but not on a crosstab query?
Also, any ideas on how to create this report on the date interval provided
by the user and using the crosstab query?