Charlie,
So near to the end, is it a good time to give up?
Try posting your whole procedure exactly as it is now for me please.
I'm sure we can get this working for you (well pretty confident anyway).
Some of these syntax problems can be hard to find but I've had some experience with some doozers in my time - lets give it a try.
Hello NeoPa,
I am having the same probelm, but cannot get the code to verify the user's old password in order to enter a new password. If you could look over it, that would be great. Thanks.
Expand|Select|Wrap|Line Numbers
- Private Sub txtPassword_AfterUpdate()
- Dim pswd As String
- Dim confirm As String
- pswd = DLookup("[strEmpPassword]", "tblUsers", "[IngEmpID]=" & txUser)
- If pswd = "password" Then
- EnterPassword:
- pswd = InputBox("Please enter a new password", "Change Password")
- confirm = InputBox("Please new password again.", "Password Confirmation")
- If pswd <> confirm Then
- MsgBox "Passwords do not match.", vbOKOnly
- GoTo EnterPassword
- Else
- DoCmd.RunSQL "UPDATE tblUsers SET [strEmpPassword]]= '" & Me.pswd & "' WHERE [txtUser]='" & Me.txtUser & "';"
- End If
- Else
- 'Your normal password checking code here
- End If
- End Sub