Solved Unable to successfully change user password on an access database form (1 Viewer)

Tiprof

Member
Local time
Today, 20:27
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

  • system.accdb
    3.9 MB · Views: 134
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:27
Joined
Jan 14, 2017
Messages
18,246
See my example app
 

Tiprof

Member
Local time
Today, 20:27
Joined
Apr 29, 2022
Messages
43
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:27
Joined
May 7, 2009
Messages
19,247
i use Tempvars to save your user_name/user.
 

Attachments

  • system.accdb
    688 KB · Views: 103

Tiprof

Member
Local time
Today, 20:27
Joined
Apr 29, 2022
Messages
43
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 ?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:27
Joined
Sep 12, 2006
Messages
15,660
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?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:27
Joined
May 7, 2009
Messages
19,247
i did not get that message.
in fact it did saved my changes.
did you first open the login form?
 

lacampeona

Registered User.
Local time
Today, 22:27
Joined
Dec 28, 2015
Messages
392
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

  • Login Template[updated].accdb
    3 MB · Views: 139

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:27
Joined
May 7, 2009
Messages
19,247
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

  • system.accdb
    804 KB · Views: 111

Tiprof

Member
Local time
Today, 20:27
Joined
Apr 29, 2022
Messages
43
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

Top Bottom