Hello, I recently added a select case to a form and now I am getting this error BUT I don't get the error all the time only sometimes. Here is what I found, if I open the form and click the OK button (cmdLogin)it gives me the:
and debug takes me to:
Now if I open the form and first click into the password box then click the OK button then it works like its supposed to it gives the correct message. I think for some reason the text box (txtPassword)doesn't have focus when the OK button is pressed but the first thing in the VBA for the button is to SetFocus. The next bit of code is from the form (frmSwitchboard)that has the option group and I set it to visible = false. Any thoughts?
Thanks,
Chad
Thanks,
SoggyCashew.....
Run-time error ‘2196’:
Microsoft Office Database cant retrieve the value of this property.
and debug takes me to:
Code:
If Me.txtPassword.Text <> "soggycashew" Then
Now if I open the form and first click into the password box then click the OK button then it works like its supposed to it gives the correct message. I think for some reason the text box (txtPassword)doesn't have focus when the OK button is pressed but the first thing in the VBA for the button is to SetFocus. The next bit of code is from the form (frmSwitchboard)that has the option group and I set it to visible = false. Any thoughts?
Code:
Private Sub cmdOption5_Click()
If IsNull(Me.fmAdminGroup) Then
MsgBox "Please select a Option!", vbCritical, "Selection Error"
Me.fmAdminGroup.SetFocus
Exit Sub
Else
DoCmd.OpenForm "frmPasswordRequired", acNormal
Forms!frmSwitchboard.Visible = False 'Hides the switchboard
End If
End Sub
Thanks,
Chad
Thanks,
SoggyCashew.....