Hi,
I have a switchboard with the first button for open form in add mode. I want the switchboard form to close also when the button is pressed. How do i do it?
Switchboards are evil! They only offer a very limited number of options, and to do anything else is a pain! Far better to roll you own "switchboard," using a form. That would require a single line of code.
If this form is only ever going to be opened from the Switchboard, I suppose you can close the Switcboard from the Form_Load event of the form being called, with the same line:
Code:
Private Sub Form_Load()
DoCmd.Close acForm, "Switchboard"
End Sub
Otherwise, you'll need to create a Macro that
Opens the Form
Closes the Switchboard
and then change your Switchboad button from opening a form to running the Macro.