Crosstab Query Problem

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

Duane Hookom

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
 
P

PC Datasheet

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.
 

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