• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 621
  • Last Modified:

Logon examples or database example

I am using Access 2000 and I have been playing with a couple sample database with logon features. I will upload a zip file with a readme.text and the mdb, only 34kb in size.  What I would like to do is set up the logon so it will prompt, to change your password at the first logon. Have the password expire every 90 days and have provisions on the logon screen to change the password and Log Off. If I could get someone to provide me with a sample database or provide instructions and code, I will rework this one. After I am satisfied with it, I will transplant it into the database I share with fellow employees.
logon.zip
0
sheldok
Asked:
sheldok
  • 6
  • 3
  • 2
  • +1
1 Solution
 
Kelvin SparksCommented:
Access security (via mdw) does not provide that level of functionality. It can be coded (and I have done it before), but assumes that no-one knows about holding down the shift key to bypass startup code.
I note that you've included the ADP group in this. If you're looking at that, then the data can be secured via Windows Authentication in SQL Server and SQL Server's security - far more robust. Will also cover a mdb using SQL Server as a back end.
 
Kelvin
0
 
sheldokAuthor Commented:
If you open the read me that is included in the zip file, the issue of the shift key has been taken taken care of with code already.  The database I want to secure is one that I have done all the work on and my back to back, likes to mess with things and he gives it to our customers and soon they will not need us.  If you have no sample code or sample database that I can incorporate, I will keep working on it.  Thanks for replying.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You would first have to store the Date the password was created, and then in your login form you would check this date:

If DateAdd("d", 90, Me.PasswordDate) > Date Then
  Msgbox "Your password has expired and must be changed.", vbOkOnly
  DoCmd.OpenForm "YourPasswordResetForm", , , , , acDialog
End If

Note: Check the OpenForm, I may have too many commas in there ;)

It's easiest to build a simple popup form where the user can change their password ... this is the form you'd call in the OpenForm method. Using acDialog will stop all processing until such time as the user closes that form, so you can then re-examine their password date to make sure it was handled.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
bobby6055Commented:
Sheldok:
I have a sample logon db that can do what you wanted and many more. It was created by:
'Created by: Richard Rensel on 18 Feb 2002 and modified by Nick Phillips.
Really I can remember where I downloaded it in 2005 on the Web but all the credits are there.

It's easy to understand and the code you wanted to expire in certain number of days are embedded under the cmdOk button of the main login form "frmUserLogon"
To testing sinply follow the steps below:
(a). Open the sample db and type in Admin or Bobby as your Username
(b). Enter 1234Admin for Admin user or 1234Bobby for Bobby
      Note: - (Password is case sensitive)
(c). The very first thing you'll notice upon login is a message reminder that tells you
       that your password has expired and you must provide another password.
(d). You MUST enter a minimum of at least 8 digits /Charaters and at least one
       Capital letter to be entered
(e). For example:
         For user Bobby, enter this password to change your pasword *Bobby5678*
         notice the star at the beginning and end. Also notice one capital letter.
       For user Admin: eto chnage password enter:  (Admin5678)
       Notice bracket in the begining and end and also one Capital letter.
If you login with Bobby as username and pwd is entered as 1234Bobby then
the code will let you know that your password has expired...and you MUST change it.

If your username is Admin and you entered 1234Admin, a msgbox will inform tou that you have so many number of days to change your password. You can change it right there and then if you select the "Yes"...but if you select "No" button, then the login form will let you in.
...but once your password has expired.....then you MUST change your password.

currently the date for expiration in the sample db is set to expire in 60 days, you can modify it to 30 or 90 days...whatever you so choose. It's very easy to tweak.
I have placed the code that does in the code snippet.

***For your covenience, I have uploaded the sample db here for download.***

Please try the demo out and you can adapt it to your database provided you dont tamper with the credits if you adapt it to your db.
Good luck with your project.

Cheers !!!
Bobby

'############This is the password DATE validation code #############
                    
    DoCmd.OpenForm "frmPasswordHistory", , , , , acHidden
                    
    Select Case Forms!frmPasswordHistory.DaysOld

    Case -50
        If vbYes = MsgBox("10 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -51
        If vbYes = MsgBox("9 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -52
        If vbYes = MsgBox("8 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -53
        If vbYes = MsgBox("7 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -54
        If vbYes = MsgBox("6 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -55
        If vbYes = MsgBox("5 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -56
        If vbYes = MsgBox("4 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -57
        If vbYes = MsgBox("3 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -58
        If vbYes = MsgBox("2 days before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -59
        If vbYes = MsgBox("1 day before your password expires. Want to change it now?", vbYesNo Or vbExclamation, "Password?") Then
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
        End If
    Case -60
            MsgBox "Your password Has expired.You must change it before you can Log In", vbOKOnly + vbCritical, "Invalid Password"
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
    Case Is < -60
            MsgBox "Your password Has expired.You must change it before you can Log In", vbOKOnly + vbCritical, "Invalid Password"
            DoCmd.Close acForm, "frmPasswordHistory"
            GoTo JumpIn1:
    Case Else
        ' user is fine - do nothing
End Select
            
'######### END PASSWORD DATE VALIDATION CODE######

Open in new window

0
 
bobby6055Commented:
Sheldok:
Sorry...
Here is the sample db, please download it.

SecurityDemo.mdb
0
 
Kelvin SparksCommented:
Hi Sheldok
Now I know that you have covered your bases, I'm happy to provide code if you need. I see Bobby6055 has given you a db to try. I'll wait and see what you think as its a bit of a mission for me to get you the sample code. I'll have to logon onto a client site, where I built it, extract the code from an accdb (2007 db) and paste it into your demo. Happy to do it if you feel that the example above doesn't fit your scene.
Kelvin
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
sheldok:

I see that you've initiated a Close request, but you state "the question is answered". If your issue was resolved, then you should award points to the Expert comments that solved your issue. You should only Delete the question if your issue was not resolved.
0
 
bobby6055Commented:
Sheldok
LSM is rightIt's adviseable you award the points instead of deleting this thread. What if you need to ask followup question(s) on the answers you received on this thread? Think abou it.
0
 
bobby6055Commented:
See LSM cxomments
0
 
bobby6055Commented:
Sheldok:
In the sample db I provided under  ID: 26254728 - there are other things you dont know yet.
And I guarantee you that as you adapt it to your database and you begin to use it, you will definitely ask series of other questions. That I very much know.
 
Cheers
Bobby
0
 
bobby6055Commented:
My recommendation is #3.
Please split points among all experts who participated on this thread.
 
Bobby
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Accept this one: http:#a26254728
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now