Results 1 to 4 of 4
  1. #1
    madyson is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Location
    Columbus, OH
    Posts
    2

    Recursive Lookup and display?

    Let's say I have created a contact database for my company, and that can include parents and kids working at the same company. Now I want to display (report or form - it doesn't matter) the contact info and include their parents if they exist. How would I go about it. Database sheet example below.



    Code:
    ID_Lname__Fname_MotherID_FatherID_Street
    01_Schidt_Jack__02_______03_______124_Anywhere
    02_Schidt_Awe___00______00_______125_Anywhere
    03_Schidt_Oh____00______00_______125_Anywhere
    If I want to print out the contact for 01 and then do a look up based on his parents IDs and include their names in the print out, how would I look it up? TIA.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    your table is not normalized.

    you need a field/column that ties them together...perhaps named "FamilyID" and then designate a value per family...

    in this case maybe the Shmidt family is ID 35...so each of these 3 records would have all the value 35 in their FamilyID field...

    then, if you want to identify whom is mother vs father vs son vs etc... you need a field named maybe "FamilyRole" for which you use a meaningful value - like M F S D

  3. #3
    madyson is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Location
    Columbus, OH
    Posts
    2
    In the real one I have something similar, but what happens when you have several generations of grand parents, parents, and children. Such as a genealogy database. There has to be a way to look them up using the parents ID number, somehow.

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    well while I've never made a geneology db - one would presume they have 2 Family ID fields per record; one for the maternal family ID and one for the paternal family ID

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

Similar Threads

  1. Empty Lookup
    By mikel in forum Access
    Replies: 39
    Last Post: 08-07-2009, 01:00 PM
  2. Lookup Values
    By gjw1012 in forum Access
    Replies: 5
    Last Post: 07-22-2009, 08:56 AM
  3. Lookup Form
    By cav0227 in forum Forms
    Replies: 0
    Last Post: 04-16-2007, 09:23 AM
  4. Lookup
    By neon'00 in forum Forms
    Replies: 2
    Last Post: 04-14-2007, 01:19 PM
  5. Lookup Tables
    By JoeBio in forum Database Design
    Replies: 1
    Last Post: 09-01-2006, 07:34 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