Check if user has a blank password

V

VanmaN

In MS Access 2002 (XP)
I have created a multi-user database.
Each user has a username and should have a password.
How can i check if a user has a blank or null password and then force them
to change their passwords.

Also how can i make a password expire after a specified period.
 
J

Joan Wild

You could attempt to open a DAO workspace in code using the CurrentUser()
for the username, and a blank password.

If the password is wrong (i.e. they have a password set), you can trap the
error.

If you get no error then you'll know it is blank, and can throw up a nice
message, and a form for them to set their password.

As for forcing a change, you'd need to create a table with the username and
dateLastChanged. You'd then check today's date against that table and see
if they're due.
 
V

VanmaN

Thank you Joan Wild.

This works like a charm. Users now have to change their passwords if they
log in and have a null password.
 
S

Sandy

Any chance you can share that code? I need to do the same and have no clue
where to start.
 

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

Top