Link to home
Start Free TrialLog in
Avatar of cdmac2
cdmac2

asked on

Parent / Child Relationship - Viewing and editing - MS Access

I am working on the design of a database enhancement that will incorporate parent/child relationships.  I am looking to have the ability to have an ongoing string of Parent, Child, Grandchild, etc. I have two tables:

PEOPLE:  PersonID, Person
LINK: ParentID, ChildID

I have a query that links the parents to the children.  I've filled in some data below and also attached it as a screen.  As you can see.  Dave is a parent of Amy and Carrie.  Amy is a parent of Dylan and Colin, therefore Dave is a grandparent of Colin.  

One of the main things I am looking for is a way to display the relationships for the user to view.  If this could be done on a form, it would be preferable.  I have attached a screenshot of the "visual view" of the relationships that I would ideally like to see.  I have looked into the "treeview" ActiveX component, but could not get anywhere with that.  

Any assistance or ideas you could provide would be greatly appreciated.
Parent  | Child
Dave    | Amy
Dave    | Carrie
Amy     | Dylan
Amy     | Colin

Open in new window

Parent-Child-Query.jpg
Visual-View.jpg
Avatar of Luke Chung
Luke Chung
Flag of United States of America image

In Access, you can use subdatasheets in your tables to go down one level, but I don't think it's recursive.
You'll need to use the Treeview control to do this but it'll require a bit of VBA coding to load it up.
see if this link helps
How To Use the ADO SHAPE Command
http://support.microsoft.com/kb/189657

Avatar of cdmac2
cdmac2

ASKER

Thanks capricorn1... that ADO SHAPE command may work, but I cannot figure it out from the article (it's a little too technical for me).  Could you show me how to use the SHAPE command using my example data?
Avatar of cdmac2

ASKER

Just following up... Any suggestions??
ASKER CERTIFIED SOLUTION
Avatar of noetymology
noetymology
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cdmac2

ASKER

That did it... thx noetymology!!