UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 'Cancel' option in MsgBox    
 
   
FranksBank
post Nov 25 2004, 05:53 AM
Post #1

New Member
Posts: 7
From: South Wales, UK



Can anyone tell me if it's possible to create a Message Box in Access 97 (or 2000) that provides the ability to either proceed with or cancel the Macro. I.e. I have one Macro that runs various others and I would like a 'warning' message that says what's about to happen and asks the user if they are sure they want to continue. This obviously needs to incorporate a way for the user to cancel the Macro if they don't want to carry on.

Is this possible, and if so how?

Any ideas?

Cheers
FB
Go to the top of the page
 
+
ScottGem
post Nov 27 2004, 05:48 AM
Post #2

UtterAccess VIP / UA Clown
Posts: 25,021
From: LI, NY



I'm not sure how to do it in macros (I practically never use them), but its easy in a module:

If MsgBox("messagetext",vbOKCancel,"Warning") = vbOK Then
proceed with actions
End If

HTH
Go to the top of the page
 
+
FranksBank
post Dec 3 2004, 01:21 PM
Post #3

New Member
Posts: 7
From: South Wales, UK



Scott, my thanks to you.
This works perfectly. I just needed a 'checkpoint' before a whole bucket load of things got updated. I'd tried a MsgBox line in VB but the Cancel bit didn't work. Your solution is way more simple, and works!

Thanks again

Cheers
FB

Edited by: FranksBank on Fri Dec 3 13:37:24 EST 2004.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 07:02 PM