Hi,
I have a button on my switchboard that needs to close the switchboard and open the login form. My code is below. I have tried me.close as well and I just get no response when clicking the button. It doesn't open form login. It doesn't close the switchboard. It's just a dead button right now. On the switchboard form, I have the "Close Button" property set to no. I turned that back to yes to see if it made a difference, but still nothing. This same type of code has worked in other parts of my program to close a form and open another, but it won't work on this particular form for some reason. What am I doing wrong?
Code:
Private Sub btnLogOut_Click()
On Error GoTo btnLogOut_Err
DoCmd.OpenForm "frmLogIn", acNormal
DoCmd.Close acForm, "Switchboard1"
btnLogOut_Exit:
Exit Sub
btnLogOut_Err:
MsgBox Err.Description
Resume btnLogOut_Exit
End Sub