Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Location
    San Jose, CA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help to create a recursive relationship in a table (2000/2002)

    HI: I'm new on the board here but a regular WOW reader. I need some help to create a recursive relationship in a table in Access. I have an emploee table where the PK is the employee payroll number and I want to be able to reference each employee's manager (direct report) by referencing the managers employee payroll number in the manager field as a FK referencing the PK there by creating the recursive relationship. Access won't allow me to create a look-up of the Emp_ID or to refer to a query that references the table that is open. Any suggestions whould be greatly appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help to create a recursive relationship in a table (2000/2002)

    Take a look at the Employees table in the Northwind sample database. It uses a self-join in the ReportsTo field using a Select statement in the rowsource of the lookup. That will show you how it can be done.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Jan 2002
    Location
    San Jose, CA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help to create a recursive relationship in a table (2000/2002)

    HI Charlotte: Thanks for the direction - borrowed the select statment from northwind and made some minor adjustments ... I'll put in my sample data and give it a whirl... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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