Exit using a command button

wop0703

Registered User.
Local time
Yesterday, 20:16
Joined
Jun 1, 2005
Messages
77
I have a form that has a command button on it. When the user clicks the command button I want the form that was up to be exited. I cannot find the correct syntax for this. Please help.
 
Thank you.
 
Code:
DoCmd.Close acForm, Me.Name
 
If you want to completely exit the application you can use:
DoCmd.RunCommand acCmdExit
 
He wants to close an open form.

There are many ways to exit [close Access] the database.

Code:
DoCmd.Quit acQuitSaveNone
DoCmd.RunCommand acCmdExit
Application.Quit acQuitSaveNone
 

Users who are viewing this thread

Back
Top Bottom