Confirming Text box Value

DeanFran

Registered User.
Local time
Today, 08:03
Joined
Jan 10, 2014
Messages
111
I got sidetracked during my lessons by a discussion of a login form. So I built one along with a user table, and lo and behold it works. I got to thinking about how a user might change their password without help from an admin or someone else getting into the table and changing it for them. I figured I could launch a password reset form and let the user type in their new password. This works too. What I am hanging up on is this: I figured that the user should be prompted to retype their new password then run a little vba to compare the two values, and if they match, write the new value to the field. I tried an If statement that checks for equality, but I don't know how to go about configuring the code to update the field in the table. Any help or guidance is appreciated.
 
One way, changing to your names:

Code:
  CurrentDb.Execute "UPDATE tblUsers SET tblUsers.UserPassword = '" & Me.txtCnfPW & "' " & _
                    "WHERE tblUsers.UserName= '" & Me.txtUserID & "'"
 

Users who are viewing this thread

Back
Top Bottom