crosstab query with datea parameters

R

Rose

I am trying to put a Date Parameter in a Cross Tab Query. When I use the
initial queries (which the cross tabs is based off of) the wording below in
the criteria works well to prompt date entry. However, when I try to run the
cross tab query it states (The Microsoft Access Search Engine does not
recognize.....) I need the user to be able to change the dates each time the
cross tab runs. Any Ideas?

Between [Forms]![frmReportDates]![txtBeginDate] And
[Forms]![frmReportDates]![txtEndDate]
 
K

KARL DEWEY

Add the following above the TRANSFORM part of the SQL --

PARAMETERS [Forms]![frmReportDates]![txtBeginDate] DateTime,
[Forms]![frmReportDates]![txtEndDate] DateTime;
 
J

John W. Vinson

I am trying to put a Date Parameter in a Cross Tab Query. When I use the
initial queries (which the cross tabs is based off of) the wording below in
the criteria works well to prompt date entry. However, when I try to run the
cross tab query it states (The Microsoft Access Search Engine does not
recognize.....) I need the user to be able to change the dates each time the
cross tab runs. Any Ideas?

Between [Forms]![frmReportDates]![txtBeginDate] And
[Forms]![frmReportDates]![txtEndDate]

Put

Parameters [Forms]![frmReportDates]![txtBeginDate] DateTime,
[Forms]![frmReportDates]![txtEndDate] DateTime;

at the very top of the SQL text, before the SELECT keyword.

It's always allowed (and often helpful) to specify your parameters, but for
some reason it's obligatory for Crosstab queries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top