Macros

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I am creating a main menu (form) with several command buttons to open other
forms. How can I make the main menu close when the new form opens. When I
right click the command button to go into "Build Event" it takes me to a
page with a bunch of code. I don't know code. How can I add a command to
close the previous form, when the new form opens.

Thanks for your help.

Greg
 
hi,
here is what i do.

Private Sub lblSell_DblClick(Cancel As Integer)

DoCmd.OpenForm "frmSell"
Me.Visible = False
'DoCmd.Close acForm, "frmMainIntro", acSaveNo

End Sub

2 ways. you can close the main form or you can just make
it not visible. i use the me.visible = false
you would need another sub in the other form to close it
when done and open the main form back up or make it
visible.
 
Greg,

In your macro that opens the new form, on a line fter you open the new form,
Chose Close from the Action Options, Form from the Object Type options, enter
the name of your main form in Object Name, and Select No for Save.
 
Back
Top