Copy prompted parameter to several queries run by the macro

C

Crispywafers

Is it possible to copy prompted parameter to several queries run by
the macro?

Meaning...

I have three macros that update the same table in different ways but
ask for the same parameter criteria [Specify Year].

The macro runs all three queries in order and therefore prompts for
[Specify Year] 3 times. Is it possible to have it prompt once, and
then copy that so that the last two queries don't ask the same
question.

Thanks!
 
S

Steve Schapel

Crispy,

No, not really. The easiest way to nandle this is to put an unbound
textbox on a form which will be open at the time that the macro is run,
enter the required year into this textbox, and then, in the criteria of
the queries, instead of the existing parameter prompts, you refer to
this textbox, using syntax such as [Forms]![NameOfForm]![NameOfTextbox]
 

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