Results 1 to 8 of 8
  1. #1
    Sgt_Utz is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    25

    Best way to create a Family relationship table?

    I am designing a database for a cemetery and working to create a relationship table to link customers who are buried in the same cemetery (father, son, etc.)



    The plan is when having the customer form open I click a button "Create Relationship" which has a form popup with an option group including "Mother, Father, Son, Daughter, etc.".

    When saving the relationship it creates 2 records (shown below in green). Customer 23's Mother is 35. Using VBA it determines that Customer 35's Son (referencing sex field) is 23. This ensures that when pulling up the Mothers record it automatically shows 23 as her son in the subform. A composite ID is used so record 2335 and 3523 is created so the relationship can't be duplicated.
    Click image for larger version. 

Name:	Family relationship example.PNG 
Views:	23 
Size:	7.0 KB 
ID:	45196

    The pic below is crudely made from excel and google images just for reference but shows the end goal.
    Click image for larger version. 

Name:	Family Relationship.jpg 
Views:	22 
Size:	68.5 KB 
ID:	45199

    I'd have to code it to delete 2 records in the relationship table for every relationship created if deleting the customer, so just wondering if this is best practice or if anyone knows of a better way to accomplish this?

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    I don't know if there is better but maybe instead of recreating the wheel, look at OTS family tree apps.

    IMO, family tree and manufacturing type dbs are the most difficult to build because of recursive relationships. Other db platforms such as SQLServer handle this better than Access.

    Also, Interned is a misspelling of Interred.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Agree; not for the faint of heart. Allen Browne site has some info that might help

    http://allenbrowne.com/ser-06.html
    http://allenbrowne.com/AppHuman.html
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Microsoft published a template for a genealogy DB that might provide some useful ideas.

    MS_Genealogy_Database_01076524.zip

    Click image for larger version. 

Name:	utz.png 
Views:	20 
Size:	35.0 KB 
ID:	45202

  5. #5
    Sgt_Utz is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    25
    Thanks everyone! So I'm not interested in building a full genealogy tree, just enough to show who's related to who in the cemetery so it shows up on the subform. So you won't be able to create a tree from what I need.

    I'll look into everything mentioned. Thanks!

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    I think you will find the principles are basically the same, the difference being that you won't likely need to go too deep. I can see how it might begin to approach such a level though, as
    A marries B, both are in the cemetery
    A & B had a child C who is also there
    C had married D, and D is related to ...

    I suppose the level of complexity depends on how far back you are going. It could be hundreds of years, which could certainly expand the connections.
    Good luck with your research1
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Forum member @accesstos published a family relationships example database here a couple years ago. A forum search should locate it. Also try looking at the similar threads at the bottom of this page
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

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

Similar Threads

  1. Replies: 2
    Last Post: 10-21-2019, 08:10 AM
  2. Replies: 5
    Last Post: 09-04-2017, 09:22 PM
  3. Replies: 1
    Last Post: 11-27-2016, 05:22 PM
  4. Replies: 3
    Last Post: 08-04-2015, 10:42 AM
  5. Replies: 5
    Last Post: 01-31-2015, 02:44 PM

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