Running a crosstab based on a user's date input (with [])

viio

New Member
Joined
Dec 16, 2003
Messages
13
Is it possible to do this? I'm trying to get a crosstab to run for a particular date range, but without the user having to edit the query it's based on. I've had a search through the forum but I can't find anything on this.

The query has this in the date field:

Code:
Between ["Enter Start Date for report: dd/mm/yyyy"] And ["Enter Finish Date for report: dd/mm/yyyy"]

Which works fine in the query, but when that is passed to the crosstab and run, I get this error:

Code:
The Microsoft Jet database engine does not recognize '[]' as a valid field name or expression.

Any ideas or suggestions for getting it working? I'm on Access 2000 btw.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
In Design view, go to the Query menu item and select Parameters.

For each parameter, enter its descriptive text (minus the square brackets) in the first column of the dialog, and the data type (Date/Time) in the second.

Crosstabs often require you to define the parameters, or else they get cranky.

Denis
 
Upvote 0

Forum statistics

Threads
1,221,680
Messages
6,161,251
Members
451,692
Latest member
jmaskin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top