Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Parameter Values When Running Queries

Status
Not open for further replies.

RonCT

Technical User
Dec 11, 2003
37
0
0
US
I have 10 Parameter Queries that require the user to input the same values when a macro is running. Is there something I can do to have the user enter the values only once and they will get fed to the other 9 queries running in the macro? Thanks!
 
Use a form. You can set the criteria line to:
[tt]Forms!MyForm!MyTextBox[\tt]
For each place that the same criteria needs to be entered. You can run the macro from a command button, if you wish. Don't forget to keep the form open.
 
RonCT
The best way is a different approach.

Create an unbound form, with an unbound text box in which you enter the value you want pulled from the query. With a command button, drive the report from that form.
For sake of example, let's call the form frmInput, and the text box txtInput.

In the various query columns, in the criteria column, put
Forms!frmInput!txtInput

Another approach, rather than hard-wiring the queries, would be to add code to the command button Where clause, that pulls in the value from the input box on the form.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top