Using a Macro to change Query Criteria....

A

Andy

Hello,
I have a Query that has selection criteria (Example: Day=5)
Now I want to write a Macro that opens the query in design
view and changes the criteria to a value specified by the
Macro (Example: Change Day=5 to Day=17 or 19 or 31), then
resaves the query.

Any ideas? I and do the OpenQuery command and go into
Design view but have no idea how to get to the Criteria
area. Is there a record Macro command like in Access to
help point me in the right direction?

Thanks in Advance!
 
D

Douglas J. Steele

I don't believe this is possible using a macro: you're going to have to use
VBA code.

On the other hand, if you put something like [Enter Day] instead of 5 in
your query, the user will be prompted to input whatever value they want.
 

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