mistermarty
Member
- Local time
- Today, 23:25
- Joined
- Oct 31, 2020
- Messages
- 41
Ok friends. I need some help… I’m new to this so please explain it as though you were instructing a young child! This is to do with user log-in details for my database.
I have a table called tblUsers, with the usual stuff like ID, Name, UserName, Password fields etc. I have managed to get the logging in part working, but I would like to have the facility to set a new user’s password to something like “password” and force them to change it when they log on for the first time.
I have a form called frmLogIn which is used to log into the database, and another form called frmResetPassword for the process of choosing a new password. When the user logs in for the first time, the login form checks what the current password is, and if it is “password” the frmResetPassword form automatically opens up; if not, the database opens up as normal.
At the moment, my frmResetPassword form has 4 unbound text boxes: Username, Current Password, New Password and Re-type Password. It also has 2 buttons: Confirm and Cancel.
Here’s where I need help. I need to get Access to check the UserName and Password field against the tblUsers, and if they are correct, enable the user to input a new password. The new password needs to be entered in the New Password box and the Re-type Password boxes, and these have to match before the change is accepted. Finally, when the user clicks the Confirm button, it should update the tblUsers with the new password.
I have managed to get a bit further with this, but when I get to submitting the change password screen, it changes ALL of the user passwords that are set to "password" (using an update query). How do I get it to just change the password for the specific usename? Below, I have attached some screenshots in sequence, and the code attached to the change password submit button. Thanks again.
Cheers





I have a table called tblUsers, with the usual stuff like ID, Name, UserName, Password fields etc. I have managed to get the logging in part working, but I would like to have the facility to set a new user’s password to something like “password” and force them to change it when they log on for the first time.
I have a form called frmLogIn which is used to log into the database, and another form called frmResetPassword for the process of choosing a new password. When the user logs in for the first time, the login form checks what the current password is, and if it is “password” the frmResetPassword form automatically opens up; if not, the database opens up as normal.
At the moment, my frmResetPassword form has 4 unbound text boxes: Username, Current Password, New Password and Re-type Password. It also has 2 buttons: Confirm and Cancel.
Here’s where I need help. I need to get Access to check the UserName and Password field against the tblUsers, and if they are correct, enable the user to input a new password. The new password needs to be entered in the New Password box and the Re-type Password boxes, and these have to match before the change is accepted. Finally, when the user clicks the Confirm button, it should update the tblUsers with the new password.
I have managed to get a bit further with this, but when I get to submitting the change password screen, it changes ALL of the user passwords that are set to "password" (using an update query). How do I get it to just change the password for the specific usename? Below, I have attached some screenshots in sequence, and the code attached to the change password submit button. Thanks again.
Cheers





