Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parent / Child Relationship - Viewing and editing - MS Access

Posted on 2009-05-07
9
Medium Priority
?
789 Views
Last Modified: 2012-05-06
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
0
Comment
Question by:cdmac2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 10

Expert Comment

by:Luke Chung
ID: 24326391
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.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 24326493
see if this link helps
How To Use the ADO SHAPE Command
http://support.microsoft.com/kb/189657

0
 
LVL 1

Author Comment

by:cdmac2
ID: 24327350
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?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:cdmac2
ID: 24340229
Just following up... Any suggestions??
0
 
LVL 5

Accepted Solution

by:
noetymology earned 2000 total points
ID: 24392580
Since you want to display relationship of your data to your user, treeview control suits this requirement. Please find attached a sample database created using KB article http://support.microsoft.com/kb/209891 which is a simpler method. You will have to change the field names in the table/code. Open the form and expand Fuller by double clicking it. Hope this helps.
Parent-Child-.mdb
0
 
LVL 1

Author Comment

by:cdmac2
ID: 24470237
That did it... thx noetymology!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question