DoCmd.Close not working

TimE

Registered User.
Local time
Today, 07:53
Joined
May 17, 2005
Messages
55
I am using the following code but it will not close the form. Any idea what may cause it not to work?

Private Sub cmdAddNewExit_Click()
On Error GoTo Err_cmdAddNewExit_Click

DoCmd.Close

Exit_cmdAddNewExit_Click:
Exit Sub

Err_cmdAddNewExit_Click:
MsgBox Err.DESCRIPTION
Resume Exit_cmdAddNewExit_Click

End Sub
 
What are you trying to close? If the database, it's

DoCmd.Quit
 
I want the form to close.......I can't believe this, I forgot to add the On Click [Event Procedure] to the button.


Thank you for the quick response.
 

Users who are viewing this thread

Back
Top Bottom