Pass criteria in Microsoft Query

I

info

I have a macro I wrote that executes 4 queries to an ODBC Database.
Each query runs on different table in the database but uses the same
search criteria. How can I pass the saved variables to the 4 queries
so the user doesn't have to enter them 4 times.

Thanks for the help
 
W

ward376

Use parameters in the queries, then have the parameters refer to the
cell(s) where the criteria have been entered.

Thanks!
Cliff Edwards
 
I

info

Use parameters in the queries, then have the parameters refer to the
cell(s) where the criteria have been entered.

Thanks!
Cliff Edwards

So in the query on the criteria line I put a cell reference? I can
enter the values into a cell on the spreadsheet how do I have the
queries refer back to that cell when the macro is running?
 
W

ward376

Where are you querying from? (Access, as400 etc.) Are you using MS
Query?

If you can edit the SQL statement directly substitute a question mark
for an explicit value.

Cliff Edwards
 

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