From: Rose on
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]



--
Rose
From: KARL DEWEY on
Add the following above the TRANSFORM part of the SQL --

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

--
Build a little, test a little.


"Rose" wrote:

> 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]
>
>
>
> --
> Rose
From: John W. Vinson on
On Thu, 8 Apr 2010 19:58:01 -0700, Rose <Rose(a)discussions.microsoft.com>
wrote:

>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.
--

John W. Vinson [MVP]
 | 
Pages: 1
Prev: Select Query
Next: Finding data prefixed with '??'