G
Guest
I have been working on the one problem all day and am ready to pull my hair
out. If I comment out the if stetements it works fine. But when I leave them
in it will not validate [usertemp]. The field is being populated by
=User.column(2) which displays either "admin" or "Support". Any suggestions?
Private Sub PW_AfterUpdate()
'Check value of password in PW to see if this matches value chosen in combo
box
If Me.PW.Value = DLookup("PW", "PW", "[Key]=" & Me.User.Value) Then
User = Me.PW.Value
'Complete required procedure
If [usertemp] = "Support" Then
Forms![Personnel]![SSN].Visible = True
Forms![Personnel]!AddMember.Visible = True
Support.Visible = True
[Authorize Purchase].Visible = True
End If
If Forms![Personnel].PW = "Admin" Then
EPR.Visible = True
Me.AllowDeletions = True
End If
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid
Entry!"
Me.PW.SetFocus
End If
End Sub
out. If I comment out the if stetements it works fine. But when I leave them
in it will not validate [usertemp]. The field is being populated by
=User.column(2) which displays either "admin" or "Support". Any suggestions?
Private Sub PW_AfterUpdate()
'Check value of password in PW to see if this matches value chosen in combo
box
If Me.PW.Value = DLookup("PW", "PW", "[Key]=" & Me.User.Value) Then
User = Me.PW.Value
'Complete required procedure
If [usertemp] = "Support" Then
Forms![Personnel]![SSN].Visible = True
Forms![Personnel]!AddMember.Visible = True
Support.Visible = True
[Authorize Purchase].Visible = True
End If
If Forms![Personnel].PW = "Admin" Then
EPR.Visible = True
Me.AllowDeletions = True
End If
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid
Entry!"
Me.PW.SetFocus
End If
End Sub