Crosstab Query Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a select query set up to establish the fields i require for a
crosstab query. The crosstab query is the set up and works fine but i need to
set the criteria of ''between dates' based on the input from a form. when I
try to put 'Between [Forms]![fdlgReportCriteria]![txtStartDt] And
[Forms]![fdlgReportCriteria]![txtEndDt]' into the select query to limit
records I get an error saying 'The microsoft jet database engine does not
recognise '[Forms]![fdlgReportCriteria]![txtStartDt]' as a valid field name
or expression'
Does anyone know how i can set the criteria without getting this error. i
know it is not an error in the statement as it works fine in the select query
but the crosstab doesn't like it at all. Any ideas greatly appreciated.
 
This question gets asked at least 2-3 times per week.
You need to set the query parameter data types. Select Query->Parameters and
enter
[Forms]![fdlgReportCriteria]![txtStartDt] Date/Time
[Forms]![fdlgReportCriteria]![txtEndDt] Date/Time
 
Open your crosstab query in design view. Right click in the query window.
Click on Parameters. Under parameters enter:
[Forms]![fdlgReportCriteria]![txtStartDt] on the first line and under Data
Type enter Date/Time. Again under parameters on the second line enter:
[Forms]![fdlgReportCriteria]![txtEndDt] and under Data Type enter
Date/Time.

You need to explicity declare the data type for parameters for a crosstab
query.
 
Back
Top