Pausing a macro

D

Diavolo

I am trying to pause a macro untill a click of a button
tried to write a code that loops until the button is
pressed and putting that into the macro but system just
freezes. then tried to look for a time delay so system
would not freeze but VBA does not seem to have this
function.
 
C

Chris B

Could you simply use a MsgBox action? Then the user has
to click through the message before the macro will proceed.
 
D

Diavolo

That wont work as I need the user to input some data from
combo boxes into a form that are then to be used in a
query and with a MsgBox open the user cant do this

Thanks anyway
 
L

Lisa Clarke

How about the initial macro steps only included the
actions to the point you want to pause.
If needed - then display the form they need to fill in.
Then attach another macro containing the rest of the
actions you want to run to the button you want them to
click.
Lisa
 
R

RJZIERTEN

Could you say you are creating a query on the fly where
the criteria may be different everytime you run the query?

I've done this different ways set up a prompt in the
criteria line of the query. Like this, "[Enter the date
the record was created]"...without the parantheses.
Anything in square brackets will cause Access to bring up
a prompt dialog requiring input and a response before the
query/macro will continue.

Create a data input form or subform with unbound fields
for inputting your needed data/query criteria. In the
criteria lines of your query, put the names of the fields
from your form (I use the "build wizard" to ensure
accuracy of names). Now run your macro, without the
prompts mentioned in the first example...you can even drop
a macro button on your form for convenience.

RJZ
 

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