Clear Password through VBA

  • Thread starter Connie B via AccessMonster.com
  • Start date
C

Connie B via AccessMonster.com

Does anybody know if it is possible to use code to clear another user's
password without knowing the password, like you can do in Tools, Security,
User and Group Accounts, Clear Password?

I have been given a requirement for users to change their passwords
periodically so I have created a custom form for the users to change their
own passwords, which also stores the date when each user's password was last
changed. For users who have forgotten their passwords, I would like one of my
two database admins to be able to clear their passwords, but if they use the
standard User and Group Accounts form to clear the password, I am not able to
reset my table that tracks the last time the password was changed, so I lose
my history and also they are able to have an empty string for a password
(which my form prohibits).

I don't need/want to know what the password is, I just need to be able to
clear it. I am not able to use the NewPassword method, because it requires
that the admin user knows the old password before being able to change it.
Does anybody have any suggestions?
 
J

Joan Wild

You can use the NewPassword method.
If your 'database admins' are members of the Admins group, the string
supplied for the old password will be ignored.

You should be able to use the same form you have.
 
C

Connie B via AccessMonster.com

Thank you Joan. It didn't occur to me that old password was not required for
database amdins since the help file does not state that it is optional. I
went back to the help file and now I do see that it mentions that it must be
supplied OR that you must be a member of the admins group, but I did not
initially catch the OR.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

New-password policy 2
Changing password programatically 2
Warning - Extortion Scam 2
Password change by user 17
Clear user password in VB 4
Change Password by User 4
users set their own password 3
user password 1

Top