Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close multiple Forms with one Button 1

Status
Not open for further replies.
Jul 15, 2008
8
GB
Hi,

This might be really simple to do, but I'm having a bit of a moment, and can't seem to work it out!!!!

I'm creating a database, and when a new record has been added, I need the 'close form' button to close 2 forms at once and return to the main menu. I'm not using a switchboard, would this help?

Thanks in advance

Di Nicholls
 
Code:
Private Sub BtnClose_Click()
with docmd
       .Close acForm, "Form1",saveoptions
       .Close acForm, "Form2",saveoptions
end with
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top