Results 1 to 2 of 2
  1. #1
    avarusbrightfyre is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Sep 2009
    Posts
    60

    Table lookup, sort of


    Ok, so I'm trying to mimic the whole user level security thing because our database needs to assign work to be done to certain levels of leadership. I have a table with usernames and security levels assigned to them, and I'm using the "environ(username) function to grab the username automatically so my computer illiterate co-workers don't have to log in. What I need is a way to compare the environ username to my table, figure out what the security level for the current user is, based on the table, and use that sec level to allow or disallow access to certain information and buttons.

    Is this possible? Right now I'm using a text box with form loading code that sticks the environ username into the text box. Usernames for each user will always be the same no matter what machine they log into. I just can't figure out how to use that to get the sec level I need

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    A DLookup() would be one way. Given that you'll need it throughout the application, I'd probably grab it after you get the user name and store it in another textbox. More on syntax:

    DLookup Usage Samples
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Table and Lookup Questions
    By Boltman in forum Access
    Replies: 5
    Last Post: 07-08-2011, 07:28 PM
  2. Transaction v Lookup table
    By jke in forum Access
    Replies: 2
    Last Post: 06-15-2011, 08:44 PM
  3. Lookup Table
    By BigCat in forum Access
    Replies: 2
    Last Post: 05-19-2011, 09:53 AM
  4. Using lookup data for table 1 mutible times in table 2
    By mbjazz in forum Database Design
    Replies: 5
    Last Post: 04-26-2011, 01:18 AM
  5. One lookup table many relationships?
    By sparlaman in forum Database Design
    Replies: 4
    Last Post: 03-29-2011, 10:28 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