Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 467097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:32:47+00:00 2026-05-12T23:32:47+00:00

I have an Access application, in which I have an employee table. The employees

  • 0

I have an Access application, in which I have an employee table. The employees are part of several different levels in the organization. The orgranization has 1 GM, 5 department heads, and under each department head are several supervisors, and under those supervisors are the workers.

Depending on the position of the employee, they will only have access to records of those under them.

I wanted to represent the organization in a table with some sort of level system. The problem I saw with that was that there are many ppl on the same level (for example supervisors) but they shouldn’t have access to the records of a supervisor in another department. How should I approach this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:32:48+00:00Added an answer on May 12, 2026 at 11:32 pm

    One common way of keeping this kind of hierarchical data in a database uses only a single table, with fields something like this:

    1. userId (primary key)
    2. userName
    3. supervisorId (self-referential “foreign key”, refers to another userId in this same table)
    4. positionCode (could be simple like 1=lakey, 2=supervisor; or a foreign key pointing to another table of positions and such)
    5. …whatever else you need to store for each employee…

    Then your app uses SQL queries to figure out permissions. To figure out the employees that supervisor ‘X’ (whose userId is ‘3’, for example) is allowed to see, you query for all employees where supervisorId=3.

    If you want higher-up bosses to be able to see everyone underneath them, the easiest way is just to do a recursive search. I.e. query for everyone that reports to this big boss, and for each of them query who reports to them, all the way down the tree.

    Does that make sense? You let the database do the work of sorting through all the users, because computers are good at that kind of thing.

    I put the positionCode in this example in case you wanted some people to have different permissions… for example, you might have a code ’99’ for HR employees which have the right to see the list of all employees.


    Maybe I’ll let some other people try to explain it better…

    • Here’s an article from Microsoft’s Access Cookbook that explains these queries rather well.
    • And here is a somewhat chunky explanation of the same.
    • Here’s a completely different method (the “adjacency list model”) that you might find useful, and his explanation is pretty good. He also points out some difficulties with both methods (when he talks about the tables being “denormalized”).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an application we are developing, I have access to a database table which
I have a table in my Access application which needs to be filled with
I have an Access 2002 application which links an Oracle table via ODBC with
I have an Access application which use SQLServer 2008 R2 as database. When I
I have an Access application in which I need to do a 'mass-update'. I
I am migrating an MS Access application (which has linked tables to a MSSQL
Currently I have one application in which I am able to access .mdb or
I have an ASP.NET application which requires write access on the App_Data subfolder. The
I have a Java application which queries a database table which the current user
I have a C++ windows application which is composed of several DLLs. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.