Solved Unable to successfully change user password on an access database form

Tiprof

Member
Local time
Today, 23:16
Joined
Apr 29, 2022
Messages
43
i have a database which i wanted to update it with a password change form, which will enable users to be able to easily change the passwords after the default password has been set by the administrator.

I currently have a button that opens the password change form.

My issue is, if say I login as "Smith", and i click on the password change button, i should have "Smith" display by default on the user section of the password change form and any password i effect should update the current password for that current user in the table.

My current code isn't able to display the current logged in user on the password change form and also new password entered doesn't update in the table.

Any help with this will be greatly appreciated
 

Attachments

Last edited:
See my example app
 
See my example app
Have gone through your example. But am not able to understand it and apply to mine database. If you can do with the database i uplaoded here, i would be very grateful
 
i use Tempvars to save your user_name/user.
 

Attachments

i use Tempvars to save your user_name/user.
Thanks for your response. I tried your database and the current user displays on the change password form.

but when I try to save the new password changes, it says “enter parameter value”

how can I fix that ?
 
First, the name on the login form after the login is the user first name, rather than the the username. The first name is unlikely to be unique.
Then, in your password change form, you haven't set the username to any value - so what do you want this form to actually do?
 
i did not get that message.
in fact it did saved my changes.
did you first open the login form?
 
Hi Tiprof I try your database and you have some errors in your change password form.
Your change password form is copied from another internet page. I know it becouse I already see that and is the same problem. The password change form accept only numbers. If you write letters to change the password you wil get the “enter parameter value” box error.

I have some example from where you can learn a lot.
 

Attachments

yes i saw what is wrong in the code.
here is the fix:

...
..
DoCmd.RunSQL "UPDATE tbl_login SET [Password]= '" & Me.txtPassword2 & "' WHERE [UserName]= '" & TempVars("user").Value & "';"
...
 

Attachments

Have taken a look at your suggestions and the database you guys checked for me and it worked perfectly.
I really appreciate all your efforts.
 

Users who are viewing this thread

Back
Top Bottom