Exit database on close of form

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

Guest

Hi All,

When the user exits the "MAIN MENU" I've created, I'd like the database, or
better, MS-Access to close. By making the menu popup and modal, I'm
preventing the user from getting below the menu (to the table links), but I'd
like the db to close when they exit the form - I guess this would be the On
Close Event, but I've not a clue as to how to close the database.

Many Thanks in Advance for your Kind Help.

Pat
 
Pat,

I have multiple forms and each form has a return to previous menu button,
plus a Exit Database button. When i created the buttons, I have it on the
"On Click" to call an event procedure that does the following -

Private Sub Exit_Database_Click()
On Error GoTo Err_Exit_Database_Click


DoCmd.Quit

Exit_Exit_Database_Click:
Exit Sub

Err_Exit_Database_Click:
MsgBox Err.Description
Resume Exit_Exit_Database_Click

End Sub



I hope this helps! :)

VF
 
Back
Top