+ Reply to Thread
Results 1 to 2 of 2

Create a user level in Access Log In and display logged in user on opening Form

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    California, USA
    MS-Off Ver
    2013
    Posts
    7

    Create a user level in Access Log In and display logged in user on opening Form

    I have created a database with a user-log in and I was able to create a table with usernames with passwords and it worked perfectly when I logged in. Once I am able to log-in, it will open a form that shows 3 buttons: Data Entry, Search and Repair and Maintenance.

    I have 2 questions:
    1. How could I display the user who logged in on every Form and Report that I choose to use in the database? (for e.g. for the first Form, I could write Welcome Lomi!)
    2. How could I create a permission level for the following scenarios? I am using MS Access 2007
    (Scenario 1: All users could use the Search button, while the Data Entry and Repair and Maintenance buttons are disable)
    (Scenario 2: Only the Admin and maybe an assigned Manager could have permission for all 3 buttons)
    (Scenario 3: Only assigned Managers could use Repair and Maintenance, while the Data Entry and Search buttons are disable)

    Thank you.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Create a user level in Access Log In and display logged in user on opening Form

    I have settings for each user in tUsers. fields: UserID, Level, Name.

    when the starts the app, then collects that users settings.
    gsUserID = Environ("Username")
    (its actually a class, but you can use global var names)
    then it does DLOOKUP() to get THAT users settings from tUsers
    sWhere = "[userID]='" & gsUserID & "'"
    gsULevel=DLOOKUP("[Level]","tUsers",sWhere)
    gsUName=DLOOKUP("[Name]","tUsers",sWhere)

    then when a form is opened, various controls are enabled/disabled according to
    the users settings

    cboLevel.enabled = gsUserLevel>1
    btnAdmin.enabled = gsUserLevel=3
    Last edited by ranman256; 05-27-2015 at 01:34 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Assigning Worksheet level access to a user
    By pandyav in forum Excel General
    Replies: 2
    Last Post: 07-17-2014, 03:30 PM
  2. Create a User form that populates another sheet in excel with data from Access.
    By laras08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2013, 04:03 PM
  3. VBA: Create User Form That Takes Variable User Inputs
    By sanjeevpandey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2013, 06:14 PM
  4. How to Create User form which appears upon opening workbook?
    By MacMasta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-04-2012, 12:55 PM
  5. Call user form for logged in user's cell only
    By Spagbog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2011, 10:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1