Results 1 to 11 of 11
  1. #1
    eman is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    8

    Users logon and permissions


    I am new to Access database development. In my database I want to have a login system. The login system must validate the users and their passwords. If the username and password are valid, the user is logged in and uses certain parts of my database based on his/her user group and assigned access rights/accesslevel. This means the username must be
    passed between forms in order to restrict certain controls on each form based on the users' access level. The switchboard must also display the name of the user currently logged in. The system must also restrict the number of failed logon attempts. This means if the user provide wrong password three times, his/her username/account must be locked and the system exits automatically. His/her account will then be re-enabled by the administrator before a next successful login. Finally, there must be a way to track the activities of every logged in user at any time. That table must be available only to the user(s) with administrative access rights.

    Note: I want the usernames and passwords to reside in a table in the database. I don't want to use Windows or network logon information.

  2. #2
    eman is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    8
    I want the usernames and passwords to reside in a table in the database. I don't want to use Windows or network logon information.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    this is a db I did recently. you might find it interesting. Some of the functionality of it is pretty close to what you're saying here.

  4. #4
    eman is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    8
    Thanks Adam, You are a kind person. Thanks for sharing.
    That indeed solved some of my issues:

    - The current users is correctly displayed
    - Access levels are good

    Only two parts of the problem is left:

    - Locking a user account on a number of failed trials
    - A text file or table to track logged in user's activities over time.

    Thanks, Adam, you are a genius.

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I'm glad you only have 2 problems left. Those aren't tough. Here's what to google for the log file you want to use:

    "open text file for write vba"

    you can get the code with that query, more than likely. good luck to ya.

  6. #6
    Waubain is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    25
    Here is what I add at the end of my login in form. It only closes the database but does not lock the database.


    Code:
     
    'If User Enters incorrect password 3 times database will close
     
        intLogonAttempts = intLogonAttempts + 1
        If intLogonAttempts > 3 Then
            MsgBox "You do not have access to this database.  Please contact your system administrator.", vbCritical, "Restricted Access!"
            Application.Quit
        End If

  7. #7
    Waubain is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    25

    User level opens different forms

    I apologize for hopping on this thread, but my post was almost identical. I appreciate the example ajetrumpet submitted. I already have a simple login that is a more basic version of ajetrumpet's. I now also want to add userlevels but my question is:

    Based on the UserLevel, I want to open different menus.



    Code:
    lngUserLevel = Somehow this needs to pull in Type from the tblUsersRights
    
    If lngUserLevel = 1 Then DoCmd.OpenForm "frmUser1"
        ElseIf lngUserLevel = 2 Then DoCmd.OpenForm "frmUser2"
        Else: DoCmd.OpenForm "frmUser3"
    End If
    
    I am having trouble working this into the login code. Thank you for any help.

  8. #8
    SemiAuto40 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    41

    Question password

    Quote Originally Posted by ajetrumpet View Post
    this is a db I did recently. you might find it interesting. Some of the functionality of it is pretty close to what you're saying here.


    I stumbled upon a way to see that the password is 'password' but beside eww and ahhh of looking at your login form I really want to right click on the frm to see how you put it together. I also need to know how you disabled right click and all of the access menus functions and everything else too. So far I love what you've done! Very cool!

  9. #9
    chrisisishere is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    4
    Quote Originally Posted by ajetrumpet View Post
    I'm glad you only have 2 problems left. Those aren't tough. Here's what to google for the log file you want to use:

    "open text file for write vba"

    you can get the code with that query, more than likely. good luck to ya.
    Hello Mr ajetrumpet ,


    Can i send you private message on this forum? I've used ur permission file in access 2007 and i can't modify it as i want.... Can you please help me to do so? I want to send u the access file so that i can explain how i want it to be please.

    Thanks

  10. #10
    eman is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    8
    chrisisishere,

    Press and keep SHIFT pressed while you open the sample file. It will open in Design mode. You will then be able to edit the code to your liking.

    I hope this will help.

  11. #11
    chrisisishere is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    4
    Can't edit unfortunately

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Logon form
    By Andyjones in forum Forms
    Replies: 5
    Last Post: 09-13-2011, 01:58 PM
  2. Security Logon to database
    By sdondeti in forum Security
    Replies: 1
    Last Post: 07-05-2011, 11:41 AM
  3. XP Logon type form
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-31-2010, 02:00 AM
  4. Permissions
    By emccalment in forum Forms
    Replies: 12
    Last Post: 02-17-2010, 04:11 PM
  5. Access 2007 Users and Permissions Problem
    By botts121 in forum Security
    Replies: 3
    Last Post: 07-06-2009, 10:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums