You actually have to define the parameters
In the grey part of the query grid, right click and select parameters.
on the left side of the dialog box enter your parameters on seperate rows,
and set their data type to Date/Time.
When you view your query in SQL view, you should now have the parameters
declared, and it should look something like:
PARAMETERS [Forms]![frmStoreCredits]![txtStartDate] DateTime,
[Forms]![frmStoreCredits]![cmdCalDate] DateTime;
followed by your SELECT clause.
HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.
AFSSkier said:
How do you create a Between PARAMETER, to pass a range of date to a CrossTab
from a form?
This example doesn’t work:
PARAMETERS Between [Forms]![frmStoreCredits]![txtStartDate] And
[Forms]![frmStoreCredits]![cmdCalDate] DateTime;
--
Thanks, Kevin
Chris Reveille said:
A better way is to place 2 unbound text boxes on a form. From_Date and
To_Date.
reference these text boxes in the query' criteria like this
[Forms]![FormName]![From_Date]
or
between [Forms]![FormName]![From_Date] and [Forms]![FormName]![To_Date]
Place a command button on the form that runs the query
--
Chris
:
I have a report that I would like to run with chosen date ranges. Can I
create a parameter for date ranges in a query, so that every time I run the
report, it asks me the date ranges before running it? If so, how?
Thanks!