Solved

Parent / Child Relationship - Viewing and editing - MS Access

Posted on 2009-05-07
9
768 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
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Author Comment

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

Accepted Solution

by:
noetymology earned 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

839 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