Re: Hierarchical Relationship

From: Bernard Peek <>
Date: 2000/03/02
Message-ID: <uI7$>#1/1

In article <89liln$7h0$>, John Smith <> writes
>I am trying to make a Familytree in Access.
>In simplified form I have made
>2 tables: TblPerson and TblParents
>and 1 Querie: QryPerson&Parents.
>In TblPerson I have the basic properties of a person (ID, Name, sexe etc.).
>In TblParents I have 3 fields: Person_ID, Father_ID and Mother_ID
>TblParents is linked 1-to-1 with TblPerson by [TblPerson].[ID] and
>The other 2 fields (Father_ID and Mother_ID) are fields that look up their
>values in TblPerson.
>QryPerson&Parents joins the 2 tables so that I get 1 recordset of a person
>including who his parents are.
>So far so good but there is one problem. I'd like to build in some
>validation. For example; one should not be able to select a distant
>offspring or a distant ancestor as a parent.

You can probably do enough validation by looking at the date of birth/death and making sure that nobody marries someone born more than a hundred years earlier.

Other validation rules could get a little tricky, I do know someone whose family tree has a loop in it. It wasn't legal but it happened anyway.

Bernard Peek
Received on Thu Mar 02 2000 - 00:00:00 CET

Original text of this message