how to close a form from another form

EthanHunt007

New member
Local time
Today, 04:06
Joined
Jan 26, 2008
Messages
9
I have got a customer form that has a sub form in it, and when i click on a button in the sub form it opens the agreement form and leaves the customer form open, but i want it to close it, any suggestions

Thanks

Ethan
 
Substitute your own form and command button names:

Code:
Private Sub OpenForm2Button_Click()
  DoCmd.OpenForm "Form2"
  DoCmd.Close acForm, "Form1"
End Sub
 

Users who are viewing this thread

Back
Top Bottom