This might be an easy question it might not be. I'm having another problem with my code and either my eyes are goin crazy or i just dont see where the problem is. Anyway my code is basically supposed to take the password and put it into the system along with the generic user security level (intgenUSL) as well as put it into the UserLevelAccess form. The problem im getting is when i try to store the information in the tbl as well. I get a "error:3061 ... Too few parameters: Expected 1"
This is the segment of code that is being executed
If IsNull(strPWD = DLookup("[Emp_Password]", "tblEmployeeInformation", "[Emp_Lname]='" & Me.txtUser & "'")) Then
DoCmd.OpenForm "formUserLoginAccess", acNormal
intgenUSL = 3
Forms!formUserLoginAccess.txtUSL = intgenUSL
If MsgBox("Are you sure you want to create your password?" & vbCrLf & _
"Please write down your current password in a safe place", vbQuestion + vbYesNo, "Cancel Confirmation") = vbYes Then
CurrentDb.Execute "UPDATE tblEmployeeInformation SET " & " Emp_Password= '" & Forms!formUserLogin!txtPWD & "' WHERE [Emp_Lname] = " & Chr(34) & Me.txtUser & Chr(34)
CurrentDb.Execute "UPDATE tblEmployeeInformation SET " & " Emp_UserLevelAccess= '" & Forms!formUserLoginAccess!txtUSL & "' WHERE [Emp_Lname] = " & Chr(34) & Me.txtUser & Chr(34)
End If
This is the segment of code that is being executed
If IsNull(strPWD = DLookup("[Emp_Password]", "tblEmployeeInformation", "[Emp_Lname]='" & Me.txtUser & "'")) Then
DoCmd.OpenForm "formUserLoginAccess", acNormal
intgenUSL = 3
Forms!formUserLoginAccess.txtUSL = intgenUSL
If MsgBox("Are you sure you want to create your password?" & vbCrLf & _
"Please write down your current password in a safe place", vbQuestion + vbYesNo, "Cancel Confirmation") = vbYes Then
CurrentDb.Execute "UPDATE tblEmployeeInformation SET " & " Emp_Password= '" & Forms!formUserLogin!txtPWD & "' WHERE [Emp_Lname] = " & Chr(34) & Me.txtUser & Chr(34)
CurrentDb.Execute "UPDATE tblEmployeeInformation SET " & " Emp_UserLevelAccess= '" & Forms!formUserLoginAccess!txtUSL & "' WHERE [Emp_Lname] = " & Chr(34) & Me.txtUser & Chr(34)
End If