Parameter

  • Thread starter Thread starter Tiffany
  • Start date Start date
T

Tiffany

In VBA, I want an input box to pop up and ask me for a date. Then I want to
assign that paramter to the IN DATE field of my query. But, I would also
like to see the data between the parameter date and the paramter date -
7(days). How would I write that?

Thanks!!
Tiffany
 
In the QUERY, you can do something like the following (look up PARAMETER Query
in the online help)

Field: YourDateField
Table: YourTable
Criteria: Between [Enter End Date] -7 AND [Enter End Date]

That should pop up a dialog box when you run the query and ask you to Enter End Date.
 
Thanks John!!

But I really need to do it in VBA because I want to pass the parameter to
another query and run it after the first query is run. So then both queries
would have the same parameter input, but the I wouldn't be asked for the
parameter twice.

Tiffany
John Spencer (MVP) said:
In the QUERY, you can do something like the following (look up PARAMETER Query
in the online help)

Field: YourDateField
Table: YourTable
Criteria: Between [Enter End Date] -7 AND [Enter End Date]

That should pop up a dialog box when you run the query and ask you to Enter End Date.


In VBA, I want an input box to pop up and ask me for a date. Then I want to
assign that paramter to the IN DATE field of my query. But, I would also
like to see the data between the parameter date and the paramter date -
7(days). How would I write that?

Thanks!!
Tiffany
 
Back
Top