Hide switchboard

N

Neil Greenough

I have a swithboard with buttons on that open various forms.

When I click on a button to open a form, if possible, I'd like the
switchboard to be hidden so that there is only ever one form on the screen
at a time. On each form, I have an exit button. When this is pressed, I'd
like the switchboard to reappear and for that form to close.

Any ideas?
 
V

Van T. Dinh

Are you using the Switchboard Form created by the Switchboard or you own
custom Form as the Switchboard?

If it is the later:

To open another Form and hide the Switchboard:

DoCmd.OpenForm ...
Me.Visible = False

To close the other Form and show the Switchboard:

DoCmd.Close acForm, ...
If CurrentProject.AllForms("YourSwitchboard").IsLoaded Then
Forms!YourSwitchboard.Visible = True
Else
Docmd.OpenForm "YourSwitchboard"
End If

(A2000 or higher)

HTH
Van T. Dinh
MVP (Access)
 
N

Neil Greenough

Just to say thanks to you all, especially Van T Dinh for your replies to my
past few queries
 
Top