Close command

A

Amateur

I have the following command to close a Form:
Private Sub Mainform_Click()
On Error GoTo Err_Command19_Click


DoCmd.Close

Exit_Mainform_Click:
Exit Sub

Err_Mainform_Click:
MsgBox Err.Description
Resume Exit_Mainform_Click

End Sub

How can I change the command that the DB gets closed and not only the Form.
Thanks
Klaus
 

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

Similar Threads

Record Count...Almost! 8
Do command 4
Data Type in Textbox 1
multiple link criteria in form 6
Close command taking long time 3
lock button 15
2003 - 2007 VBA issue 6
search command 2

Top