Unbound Forms - Switchboard problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have a number of unbound forms. The following code works fine on one, but
when cmdClose_Click on one of the others - nothing happens - perplexed !? I
cut and pasted the code too !?

Private Sub cmdClose_Click()
DoCmd.Close
Forms.Item("MainSwitchBoard").Visible = True
End Sub

In both cases cmdButton to open form on the Switchboard is "
Forms.Item("MainSwitchBoard").Visible = False"

As always - any help - much appreciated !!! Ian
 
Hi,
try to reference the whole syntax instead e.g.:

Forms!MainSwitchBoard.Visible = True
DoCmd.Close acForm, Me.Name

HTH
Good luck
 
Back
Top