How can I 'pause' a Macros

G

Guest

I have a query that each time it is run it will require a parameter to be
input.
Is there a way to have a mesgbox give instructions (I have that part) and
then have the macro 'pause' while the user puts the correct parameter in -
and then 'resume' the macro?
 
S

Steve Schapel

Lori,

Where is the user supposed to put this "parameter" into? Maybe the
query itself could prompt for the parameter, if this is meant to serve
as a selection criteria for the query. For example, if in the Criteria
row of the query design grid, you put something like this, in []s
[Enter blabla value]
.... then when the query is run, the user will be asked the question, and
processing will be 'paused' until it is entered.

Another option is to have an unbound textbox on a form which will be
open when the macro is run. The user can enter the value required into
this textbox, and then this can be referenced in the query using syntax
such as...
[Forms]![NameOf Form]![NameOfTextbox]
 
G

Guest

Thanks I will try the 2nd option
This is an update query and the response (parameter) is for the actual
update field.

Steve Schapel said:
Lori,

Where is the user supposed to put this "parameter" into? Maybe the
query itself could prompt for the parameter, if this is meant to serve
as a selection criteria for the query. For example, if in the Criteria
row of the query design grid, you put something like this, in []s
[Enter blabla value]
.... then when the query is run, the user will be asked the question, and
processing will be 'paused' until it is entered.

Another option is to have an unbound textbox on a form which will be
open when the macro is run. The user can enter the value required into
this textbox, and then this can be referenced in the query using syntax
such as...
[Forms]![NameOf Form]![NameOfTextbox]

--
Steve Schapel, Microsoft Access MVP

I have a query that each time it is run it will require a parameter to be
input.
Is there a way to have a mesgbox give instructions (I have that part) and
then have the macro 'pause' while the user puts the correct parameter in -
and then 'resume' the macro?
 

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

Similar Threads


Top