Form Onopen, OnClose?

  • Thread starter Thread starter Golfinray
  • Start date Start date
G

Golfinray

I am a little confused. I open forms with command buttons on a menu form I
wrote. I used DoCmd.openform commands to open the forms. When they select a
form on the menu, I would like the menu to close and when they finish with
the form I would like the menu to re-open. Do I put code on the onopen and
onclose lines and do I use DoCmd or is there a better method? Thanks!!!!
 
1st don't contiuously open and close the menu. Simply hide/unhide it.

2nd, in the code that you use to open the form (from your menu) add code to
hide the menu and add in the form's onclose event code to unhide the menu.
 
I am a little confused. I open forms with command buttons on a menu form I
wrote. I used DoCmd.openform commands to open the forms. When they select a
form on the menu, I would like the menu to close and when they finish with
the form I would like the menu to re-open. Do I put code on the onopen and
onclose lines and do I use DoCmd or is there a better method? Thanks!!!!

One way is like this.
Code the Switchboard event:

DoCmd.OpenForm "FormName"
Me.Visible = false

Code the form's close event:

Forms!SwitchboardFormName.Visible = true
 
Back
Top