MsgBoxes

rrmangus

New member
Local time
Today, 09:43
Joined
Jul 23, 2002
Messages
9
I am including a message box at the beginning of my macro to ask if my user is sure he wants to run the macro. My problem is the message box available in Access gives several types of message boxes (ie. warning, critical, information, etc.) but none that let the user say no. I want my user to be able to pick "no" and abort the attempt to run the macro.

I know a MsgBox function is available in VB but I'm not sure on the syntax, so I'm hoping to find it in Access.

Thanks for any help you can give me.
 
The option I'd offer is to call the macro from VBA and do your message box in VBA as follows

If MsgBox("Do you want to run the macro?",vbYesNo + vbQuestion,"Run Macro?") = vbYes then
docmd.runmacro "YourMacroName"
else
'whatever you want to do
end if
 

Users who are viewing this thread

Back
Top Bottom