Close a form and return to the Switchboard

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

Ken Snell

Put this code in the OnClose event of the form:

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

Allen Browne

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.)
 
S

Sheldon

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>



.
 
S

Sheldon

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.




.
 

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

Similar Threads


Top