Results 1 to 14 of 14
  1. #1
    Sullitec is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Location
    United Kingdom
    Posts
    8

    Built-In User Level Security w/User Management Console - Access 2007-2010

    Hi All



    Attached is an application written in Access 2010 that provides an alternative to ULS in later versions of Access. It can be bolted onto any existing database by just copying all of the objects and pasting them into your system.. Then just change the start up form to be the password dialog box.

    It includes the following features:

    • Password Protected Login
    • User Level Security (Depending on your specified security levels)
    • User Management Console (For adding/editing/removing users/resetting forgotten passwords etc.)
    • First time login function for using generic passwords when setting up new users. (will prompt user to change their password on first use)

    It will require some knowledge of VBA and Access to integrate this into an existing application but should be straight forward enough to learn from.

    Credit must be paid to Richard Rensel@Quantum Data Solutions for the original idea of this back in 2002. All I've done is rebuild it, freshen the look and feel of the UI and update the code for Access 2007-2010.

    Any questions drop me a line

    Sully

    Zip File Contents:

    ReadMeFirst.txt
    Security Levels 2012 Signed.accdc (Digitally Signed Package (Due to trust centre settings on some machines))
    Security Levels Template 2012.accdt (Template File to create your database from)
    Security Levels 2012b.accdb (Raw Database file - *Most people will just use this.)

  2. #2
    mohiahmed is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Posts
    23
    None of the above work for me? Every time I try to login it gives me an error sign about 64-bit system.

  3. #3
    Sullitec is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Location
    United Kingdom
    Posts
    8
    Quote Originally Posted by mohiahmed View Post
    None of the above work for me? Every time I try to login it gives me an error sign about 64-bit system.
    Hi Mohiahmed,

    Can you tell me what the error message says word for word then maybe I can help

    Regards

    Sully

  4. #4
    mohiahmed is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Posts
    23
    ---------------------------
    Microsoft Visual Basic for Applications
    ---------------------------
    Compile error:

    The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute.
    ---------------------------
    OK Help
    ---------------------------

  5. #5
    nileflower is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2009
    Posts
    2
    thanks
    helpfully sample

  6. #6
    winterh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    110
    Thanks, my winzip has stopped working (Great) will open it and play with it in the morning as sure it will work like a dream

  7. #7
    winterh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    110
    I have found this bit of VB, but cant seem to make the thing work any ideas.

    Private Sub LoginBut_Click()
    Dim dbs As Database
    Dim rstUserPwd As Recordset
    Dim bFoundMatch As Boolean
    Set dbs = CurrentDb
    Set rstUserPwd = dbs.OpenRecordset("loginq") (This is the name of the query)
    bFoundMatch = False
    If rstUserPwd.RecordCount > 0 Then
    rstUserPwd.MoveFirst
    ' Check for matching records
    Do While rstUserPwd.EOF = False
    If rstUserPwd![loginuser] = Form_LoginScreen.cmdlogintext.Value And rstUserPwd![passwordtxt] = Form_LoginScreen.cmdpasswordtxt.Value Then (This bit turns yellow when I run the code)
    bFoundMatch = True
    Exit Do
    End If
    rstUserPwd.MoveNext
    Loop

    End If
    If bFoundMatch = True Then
    ' Open the next form here and close this one
    DoCmd.Close acForm, Me.Name
    DoCmd.OpenForm "Main"
    Else
    '
    MsgBox "Incorrect Username or Password"
    End If

  8. #8
    krajabi is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    1

    Thanks!

    Thank you very much this is greatly appreciated!

  9. #9
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi Sully,

    You have done a wonderful job. I will take a copy of that and use in my current database system. regards.

  10. #10
    zeldakr is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2012
    Posts
    3
    Yes this was dropped.
    BUT if you do not intend to make use of the new functionality like me as I only do maintenance on old DB.
    I was able to do the following in Access 2010

    Select Menu option File
    Select Menu option Options below the Help
    in the 'Choose commands from' drop down select All Commands
    Scroll down to 'Users and Permissions'

    You will need to add a 'New Group' to the list on the right hand before adding it the the group.
    When done select OK
    Work as per normal Access 2003

  11. #11
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi Noviece,

    I have added the group and then command in MS Access 2010 but all are shown as disabled functions.

    please advise

  12. #12
    zeldakr is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2012
    Posts
    3
    Quote Originally Posted by cap.zadi View Post
    Hi Noviece,

    I have added the group and then command in MS Access 2010 but all are shown as disabled functions.

    please advise

    Disabled- only during the set up. after that they are available in the Ribbon to use
    If you did not see it after the setup, save your application and then open it again.

    I have added screen dump
    Attached Thumbnails Attached Thumbnails MSAccess 2003.png  

  13. #13
    jfmark is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    4
    Hi Sully,
    I was looking for a login module for a database I am working on. Wow...this is great! I'd like to use it in my database. Let me play with it some more...I may have some questions.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    To limit user acces to specific forms, don't make buttons that open those forms available to them.

    If there is a 'menu' with buttons to open said forms, then disable those buttons for those users.

    Be aware that accessibility to the navigation pane and ribbon and right click shortcuts makes this 'security' meaningless. Holding down shift key when opening a db will override most project settings and code execution. I was able to do that with this db.

    If you are using 64-bit computer, some code will need to be modified, such as:
    Private Declare Function apiGetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    Review http://msdn.microsoft.com/en-us/libr...ffice.14).aspx

    This is a different way to get the user's network login username: Environ("USERNAME")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 7
    Last Post: 02-22-2013, 04:57 PM
  2. Is there a way to mimic user level security in 2007?
    By avarusbrightfyre in forum Security
    Replies: 4
    Last Post: 08-24-2011, 07:36 PM
  3. Replies: 1
    Last Post: 08-13-2011, 04:44 AM
  4. Replies: 8
    Last Post: 06-30-2010, 10:57 PM
  5. user level security and splitting access db
    By tomClark in forum Security
    Replies: 3
    Last Post: 02-06-2010, 04:28 PM

Tags for this Thread

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