Setting Date Range on a crosstab

G

Guest

I have a 1 table database set up to track incidents by jurisdiction (IJ or
OOJ). I set up a crosstab query to give me a count of incidents by
jurisdiction. Trying to prompt the user for a date range gives an error
message, "The Microsoft Jet database does not recognize '[Type the beginning
data:]' as a valid field name or expression."

Can I set some sort of 'Between' 'And' parameters so it will prompt me for a
date range when I try to run this crosstab query or a report based up on it?
 
A

Allen Browne

You need to declare your parameters in a crosstab (unless the Column
Headings are specified.)

1. In design view of your query, choose Parameters on the Query menu. Access
opens a dialog.

2. Enter the name and data type of each parameter, one per row, e.g.:
[Type the beginning date:] Date/Time
[Type the ending date:] Date/Time

These names must be exactly the same as the ones you typed into the Criteria
of your query.
 
F

fredg

I have a 1 table database set up to track incidents by jurisdiction (IJ or
OOJ). I set up a crosstab query to give me a count of incidents by
jurisdiction. Trying to prompt the user for a date range gives an error
message, "The Microsoft Jet database does not recognize '[Type the beginning
data:]' as a valid field name or expression."

Can I set some sort of 'Between' 'And' parameters so it will prompt me for a
date range when I try to run this crosstab query or a report based up on it?

In a Crosstab query you must set the query parameters in the Query's
Parameter dialog, as well as in the criteria row.

In query design view, click on Query + Parameters.
Write:
[Type the beginning data:]
in the left column and the field's datatype in the right column.
Make sure the spelling is identical to the criteria prompt.
Do the same for each additional criteria.

Note: your prompt asks for beginning data.
Don't you mean beginning date?
 
G

Guest

Yes, it is supposed to be 'beginning date." I've gotten the crosstab to
work, but when I try to use that crosstab query as the record source for a
report, there are no fields available.

Jesse

fredg said:
I have a 1 table database set up to track incidents by jurisdiction (IJ or
OOJ). I set up a crosstab query to give me a count of incidents by
jurisdiction. Trying to prompt the user for a date range gives an error
message, "The Microsoft Jet database does not recognize '[Type the beginning
data:]' as a valid field name or expression."

Can I set some sort of 'Between' 'And' parameters so it will prompt me for a
date range when I try to run this crosstab query or a report based up on it?

In a Crosstab query you must set the query parameters in the Query's
Parameter dialog, as well as in the criteria row.

In query design view, click on Query + Parameters.
Write:
[Type the beginning data:]
in the left column and the field's datatype in the right column.
Make sure the spelling is identical to the criteria prompt.
Do the same for each additional criteria.

Note: your prompt asks for beginning data.
Don't you mean beginning date?
 

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