Solved

Parent / Child Relationship - Viewing and editing - MS Access

Posted on 2009-05-07
9
775 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

734 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