From: CEL504 on
I have read a few of the questions and answers in the forum regarding this,
but to be honest, I have lost the plot with it.
If I have a switcboard form, from where I navigate to the other forms, how
do I close the previous form?
Say I go from the switchboard to say to the main input form, then back to
the switchboard again. Where would I write the code to tell me to close the
main input form?

As ever any help is gradly received and appreciated. Many thanks.

Cel504


From: Jeanette Cunningham on
Have a button to open the second form.

Private Sub cmdOpenForm2_Click9)
DoCmd.OpenForm "Form2"
DoCmd.Close acForm, Me.Name
End Sub


The above code will open form2 then close the switchboard.


Have a button to close form2 and return to the switchboard

Private Sub cmdOpenSwitchboard_Click()
DoCmd.OpenForm "FormSwitchboard"
DoCmd.Close acForm, Me.Name
End Sub


Note: replace Form2 and FormSwitchboard with the names of your forms.
Replace cmdOpenForm2 and cmdOpenSwitchboard with the names of your buttons.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"CEL504" <CEL504(a)discussions.microsoft.com> wrote in message
news:E6D5BECF-4FDC-49C7-ABDD-ACB5DC67E8A0(a)microsoft.com...
>I have read a few of the questions and answers in the forum regarding
>this,
> but to be honest, I have lost the plot with it.
> If I have a switcboard form, from where I navigate to the other forms, how
> do I close the previous form?
> Say I go from the switchboard to say to the main input form, then back to
> the switchboard again. Where would I write the code to tell me to close
> the
> main input form?
>
> As ever any help is gradly received and appreciated. Many thanks.
>
> Cel504
>
>