Switchboards and Forms

S

Steve Newport

I have created a switchboard which calls up several forms.
When I click on the button it brings up the form but the switch stays where
it is on top of the new form.
How do I get the switchboard to get out of the way automatically?

Then,
Once I have done with the form I have a button that closes that form but it
doesnt bring the switchboard back up. How do you get the closing form to hand
control back to the switchboard?
 
J

Jerry Whittle

Open the switchboard form in design view and bring up its properties. Go to
the Other tab and make sure that both Pop Up and Modal are set to No.

To force the issue, you could put something like this in the Close event of
each of your forms.

Private Sub Form_Close()
DoCmd.Restore
DoCmd.OpenForm "Switchboard"
Forms!Switchboard.SetFocus
End Sub
 
M

Minton M

I have created a switchboard which calls up several forms.
When I click on the button it brings up the form but the switch stays where
it is on top of the new form.
How do I get the switchboard to get out of the way automatically?

Then,
Once I have done with the form I have a button that closes that form but it
doesnt bring the switchboard back up. How do you get the closing form to hand
control back to the switchboard?

From the closing form, set this in the Form_Close event of the form:

DoCmd.OpenForm "MySwitchboard"

Similarly, in the switchboard itself, if you follow the click event
from the buttons on the form, you can call DoCmd.Close before the
event loads the new form.

Hope this helps.
 
S

Steve Newport

Brilliant. Worked fine. Many thanks

Jerry Whittle said:
Open the switchboard form in design view and bring up its properties. Go to
the Other tab and make sure that both Pop Up and Modal are set to No.

To force the issue, you could put something like this in the Close event of
each of your forms.

Private Sub Form_Close()
DoCmd.Restore
DoCmd.OpenForm "Switchboard"
Forms!Switchboard.SetFocus
End Sub
 
Top