Pause macro to get user input?

USnick

New member
Local time
Today, 13:27
Joined
Mar 1, 2008
Messages
6
I need to pause an Access macro to get the user to have a "second chance" - i.e. "Are you sure? Y or N" dialog with control buttons to click for yes or no response. The problem is, I can't figure out how to stop the macro from continuing while the dialog is pending.

I know that I can always have the call to the dialog then start a new macro from the buttons, but I want an "all purpose" dialog... sort of a free standing function that can be inserted into several different macros for diff purposes instead of each having its own form and secondary macros.

Any info would be appreciated.

PS - it has to be backward compatible to Access 2002.
 
The Macro Message box won't suffice, you need VBA. I attached a sample, where you can adapt the VBA to run your Macro's. You can also convert the macro to VBA and incorporate it into the code.

*in DB window with Macro selected...Tools >> Macros >> Convert to VB
 

Attachments

Thanks. I appreciate your help.
 
No problem,

I looked at my attachment again and the "Block" I was referring to was not set (must have undone it by accident)...anyways for anyone else trying it just double click on the line you want the code to stop at and it will add a "Dot" for debugging.
 

Users who are viewing this thread

Back
Top Bottom