I am trying to use the following update query to change a user's password. THis query runs on a command button. There are three textboxeson my form 'frmChangePassword'
: current user's ID (txtClockNum)
new password (txtNewPass)
confirm password (txtConfirm)
if the passwords match the command button to change the password is enabled. that works fine.
The tbale is 'tblpassword' has two fields:'ClockNumber' and 'Password'
When I hit the button it asks for the ClockNumber --> but I amtrying to use the WHERE line to get this from the textbox on the form. So if I type in the clock number (the same as the one in the textbox!) it runs and updates the password of all records not the one with the corresponding Clock Number.
UPDATE tblpassword
SET Password = [forms]![frmChangePassword]![txtNewPass]
WHERE ClockNumber = [forms]![frmChangePassword]![txtClockNum];
Can anyone help me with this?
: current user's ID (txtClockNum)
new password (txtNewPass)
confirm password (txtConfirm)
if the passwords match the command button to change the password is enabled. that works fine.
The tbale is 'tblpassword' has two fields:'ClockNumber' and 'Password'
When I hit the button it asks for the ClockNumber --> but I amtrying to use the WHERE line to get this from the textbox on the form. So if I type in the clock number (the same as the one in the textbox!) it runs and updates the password of all records not the one with the corresponding Clock Number.
UPDATE tblpassword
SET Password = [forms]![frmChangePassword]![txtNewPass]
WHERE ClockNumber = [forms]![frmChangePassword]![txtClockNum];
Can anyone help me with this?