Close a form and return to the Switchboard

  • Thread starter Thread starter Sheldon
  • Start date Start date
S

Sheldon

I'm trying to design a form that when closed, returns to
the main switchboard. I don't want users to view the
database window. I set the startup to not display the
database window, but when I close a form, the program
returns to the database window. I know I've done this
before, but can't remember how I did it. Please help.
Thanks.

Sheldon...
 
Put this code in the OnClose event of the form:

Private Sub Form_Close()
DoCmd.OpenForm "NameOfSwitchboardForm"
End Sub
 
Use the Close event of the form:

Private Sub Form_Close()
DoCmd.OpenForm "Switchboard"
End Sub

You may need to also uncheck Windows in Taskbar (Tools | Options | View) to
prevent the Database window showing up. (From memory, this bug was fixed in
A2002 SP2.)
 
Thank you.

-----Original Message-----
Put this code in the OnClose event of the form:

Private Sub Form_Close()
DoCmd.OpenForm "NameOfSwitchboardForm"
End Sub

--
Ken Snell
<MS ACCESS MVP>



.
 
Thank you.

-----Original Message-----
Use the Close event of the form:

Private Sub Form_Close()
DoCmd.OpenForm "Switchboard"
End Sub

You may need to also uncheck Windows in Taskbar (Tools | Options | View) to
prevent the Database window showing up. (From memory, this bug was fixed in
A2002 SP2.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
Back
Top