BCullenward
Registered User.
- Local time
- Yesterday, 21:13
- Joined
- Jul 6, 2005
- Messages
- 28
I'm looking for a way to cancel the closing of a form/app. I added a button asking if the user is sure they wish to exit, and am having difficulty finding the correct code to cancel the close event.
Here is my code
Can help or send me down the right path?
Thanks
Here is my code
Code:
Dim ians As Integer
ians = MsgBox("Are you sure you wish to exit?", vbYesNo, "Exit App")
If ians = vbNo Then
DoCmd.CancelEvent
DoCmd.OpenForm "orderlist", acNormal
Exit Sub
End If
Can help or send me down the right path?
Thanks
Last edited: