Exit Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I used the wizard to create an exit database button but I want to have a
pop-up screen just like the Delete Record button created with the wizard that
asked you if you really want to delete the record but I want the pop-up to
ask the users if they really want to exit the database and not pushed it my
accident. Thanks.
 
Hi,

I used the wizard to create an exit database button but I want to have a
pop-up screen just like the Delete Record button created with the wizard that
asked you if you really want to delete the record but I want the pop-up to
ask the users if they really want to exit the database and not pushed it my
accident. Thanks.

Try changing the wizard-generated code to something like:

Private Sub cmdQuit_Click()
Dim iAns As Integer
iAns = MsgBox("Do you really want to exit the application?", vbYesNo)
If iAns = vbYes Then
Application.Quit
End If
End Sub


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top