Macros

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
 
G

Guest

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.
 
G

Guest

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.
 

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

Top