M
Mr.Kane
I am creating a login form and keep running into the same compile
error:
here is the code
Private Sub LogIn_OK_Button_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.LogIn_ID) Or Me.LogIn_ID = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.LogIn_ID.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.Login_PW) Or Me.Login_PW = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.Login_PW.SetFocus
Exit Sub
End If
'Check value of password in Staff to see if this matches value chosen
in combo box
If Me.Login_PW = DLookup("Staff_Password", "Staff", "[Staff_ID]='"
&Me.LogIn_ID& "")Then
Staff_Name = Me.LogIn_ID.Value
'Close logon form and open splash screen
DoCmd.Close acForm, "frmFOCUS-PRO Login Screen", acSaveNo
DoCmd.OpenForm "frmFOCUS-PRO (Front End)"
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.Login_PW.SetFocus
End If
The error that is rendered is "Expected: List separator or )"
The highlighted portion of code is the double quotes after
&Me.Login_ID&
Any help would be appreciated
Marc Kane
error:
here is the code
Private Sub LogIn_OK_Button_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.LogIn_ID) Or Me.LogIn_ID = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.LogIn_ID.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.Login_PW) Or Me.Login_PW = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.Login_PW.SetFocus
Exit Sub
End If
'Check value of password in Staff to see if this matches value chosen
in combo box
If Me.Login_PW = DLookup("Staff_Password", "Staff", "[Staff_ID]='"
&Me.LogIn_ID& "")Then
Staff_Name = Me.LogIn_ID.Value
'Close logon form and open splash screen
DoCmd.Close acForm, "frmFOCUS-PRO Login Screen", acSaveNo
DoCmd.OpenForm "frmFOCUS-PRO (Front End)"
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.Login_PW.SetFocus
End If
The error that is rendered is "Expected: List separator or )"
The highlighted portion of code is the double quotes after
&Me.Login_ID&
Any help would be appreciated
Marc Kane