Close a form and return to the Switchboard

Close a form and return to the Switchboard

Post by Sheldo » Sat, 29 Nov 2003 09:31:11


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

Close a form and return to the Switchboard

Post by Ken Snel » Sat, 29 Nov 2003 09:41:45

Put this code in the OnClose event of the form:

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

--
Ken Snell
<MS ACCESS MVP>

 
 
 

Close a form and return to the Switchboard

Post by Allen Brow » Sat, 29 Nov 2003 09:46:37

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.
Tips for Access users - http://www.yqcomputer.com/
Reply to group, rather than allenbrowne at mvps dot org.
 
 
 

Close a form and return to the Switchboard

Post by Sheldo » Sat, 29 Nov 2003 09:56:08

Thank you.


message
 
 
 

Close a form and return to the Switchboard

Post by Sheldo » Sat, 29 Nov 2003 10:04:15

Thank you.


Options | View) to
this bug was fixed in
message