On Exit Message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thomaslowe
    New Member
    • Nov 2008
    • 1

    #1

    On Exit Message

    Hi can anybody help?

    I'm currently working on a project within access 2000, I'm wanting to create an on exit message, but I'm struggling.

    The message I want to read is "Are you sure you wish to exit" with a yes and no option.

    When I've tried all option just exit and I only want to do this when I click yes and if click no to cancel the event.

    If someone could kindly help me with with macro I would be grateful.

    Many Thanks
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Exit what? Textbox, a form, Access itself?

    Welcome to Bytes!

    Linq ;0)>

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      I assume you have an Exit button, this will need in the OnClick event the code:
      Code:
      if msgbox("Are you sure you wish to exit",vbYesNo) = vbYes then
        DoCmd.Quit
      endif
      Nic;o)

      Comment

      Working...