"Are you sure?" on exit?

baz7621

Registered User.
Local time
Today, 22:44
Joined
Mar 26, 2004
Messages
10
Hiya

How do i ask the user if they are sure they want to exit the the database when the click cmd_exit?
 
Code:
  Dim msg, button, title, response
  msg = "Do you really want to exit?"
  button = vbYesNo + vbDefaultButton2
  title = "Confirm Exit"

  response = MsgBox(msg, button, title)
  If response = vbYes Then
    'what to do if yes
  Else  
    'what to do if not
  End If
 
There are many threads on the subject. It all depends on how vigilant you want to be. There are many ways to exit Access so if you are serious you need to address them all.
ie: Clicking an exit button
Clicking the X on the form bar
Just clicking the X on the Access window.

Try this link for a start

http://www.access-programmers.co.uk/forums/showthread.php?t=46169&highlight=exit+access

Dave
 

Users who are viewing this thread

Back
Top Bottom