Microsof Access Password[s]

we have an Access Database that uses a single password to get into the Db.

I need to change this so that each user [and we have 10] have their own passwords.

Now then, I am not an Access person but looking into the code I see this so, as a quick and dirty method would it be possible to just change the code to say: IF OR

the code is

 word = Forms![*security].[password]
   
    If word = "xxxxxxx" Then                   'password
    passworde = True
    DoCmd.Close
    DoCmd.RunMacro "autoexec.procedures" 'optional procedures
    Call hide_toolbars
    Call UserInfoGather
    Call LastUsed
   
    Else
    counter = counter + 1
    If counter <> 3 Then
    MsgBox "Incorrect Password Strike " & counter
    Else
    MsgBox "And Out"
    DoCmd.Close
    Exit Sub
    End If
    End If

Ideally I would like to do a proper job and have it so that each user would have a password linked to their PC signon which is in the tblUsers Table and make it so that they were forced to change password every x days, but I reckon that is a BIG job

Thanks in advance
JagwarmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<deally I would like to do a proper job and have it so that each user would have a password linked to their PC signon which is in the tblUsers Table and make it so that they were forced to change password every x days, but I reckon that is a BIG job >>

This is not built into Access.  You will need to create your own login form.

1. Create a table in the db, something like tblUsers.
2. Add a startup form, frmLogin.  
3. You just need a single control, password (be sure to set the input mask to password so it's not displayed.  Then add an OK and a cancel button.  "OK" tries to login, cancel quits the app.

4. Use the following code:

Private Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function GetUserNameA Lib "advapi32.dll" (ByVal lpBuffer As String, nSize As Long) As Long


Public Function WhoAmI(bReturnUserName As Boolean) As String

        ' Function returns either user name or computer name

        Dim strName As String * 255

10      If bReturnUserName = True Then
20        GetUserNameA strName, Len(strName)
30      Else
40        GetComputerNameA strName, Len(strName)
50      End If

60      WhoAmI = left$(strName, InStr(strName, vbNullChar) - 1)

End Function

 to retrieve the network user name (windows signon).   Past the code into a module, and call it something like "basUserUtilities".

5.  Now when they click OK, you do WhoAmI(True) to get the user name, look it up in tblUsers, and see if the password typed matches what's in the table.

6. Add a "PasswordLastSet" Date/time field in tblUsers.   At login, if they login sucessfully, make the first check if the current date - PasswordLastSet is > your change interval, then put up a frmChangePassword and make them type in a new password.   Reset the PasswordLastSet  date to Date().

That enough to get you going?

Jim.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ste5anSenior DeveloperCommented:
What Access version? What back-end?
0
JagwarmanAuthor Commented:
Access 2010

What back-end?
 what does that mean?
0
ste5anSenior DeveloperCommented:
Where do you store your data?

See also Split an Access database.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Note too that Peter's Software has a nice utility for this:

http://www.peterssoftware.com/las.htm
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.