Generate set of Passwords in Access

Anonymous
2011-06-21T06:23:05+00:00

I ha ve an access database that contains the following columns :

UserID |First name  | Last Name | Username

I would like to add a password column as well and generate random passwords for the number of records found in my database , example if I have 50 records then I need to generate 50 password , 1 for every record

Any idea ?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-06-23T16:58:46+00:00

What are the better ways ?

 

As suggested upthread, include both a Password field and a date/time field PasswordExpires. When you create a new user give them a password that's really easy - "password" for example! - and set the PasswordExpires field to =Date().

Then in your logon process check the expiration date. If it's less than or equal to Date() make them assign a new password of their own choice. You can enforce "strong" passwords by (say) ensuring that their entry is of mixed case or contains at least one number:

Dim blnPwdOk As Boolean

If StrComp([txtPassword], LCase([txtPassword]), 0) = 0 Then

  MsgBox "Password must contain at least one uppercase letter", vbOKOnly

  blnPwdOk = False

Elseif StrComp([txtPassword], UCase([txtPassword]), 0) = 0 Then

  MsgBox "Password must contain at least one lowercase letter", vbOKOnly

  BlnPwdOk = False

< use Instr to check for digits and/or special characters >

You may also want to set the PasswordExpires field to some date (say three months in the future) after you update the password.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

15 additional answers

Sort by: Most helpful
  1. ScottGem 68,855 Reputation points Volunteer Moderator
    2011-06-23T18:53:33+00:00

    What are the better ways ?

     

    Instead of asking us questions how about answering ours? If you explain what you are trying to accomplish we can be specific about a better way.

    John offered you one instance and I had offered you another. Each solution involves using a default password for all and having the user enter a personal password when they enter the default. In my case, I use a PWReset field to indicate when the user needs to enter their own passport in John's passwords automatically expire after time.

    But you do not want to use a Randomly generated password.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-06-23T17:01:57+00:00

    Code is not running , whenever I click the button to execute it , nothing happen

    can you please provide me with more details ?

     

    About the code running issue - have you done this:

    http://www.btabdevelopment.com/ts/default.aspx?PageId=13

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Anonymous
    2011-06-23T14:09:55+00:00

    What are the better ways ?

    Was this answer helpful?

    0 comments No comments