473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Parent-Child Relation

smartchap
236 100+
I have a database (in access) having 3 tables: Parent, Child1 & Child2. All the 3 tables have a common field 'PersonID'. Parent table has, say, 10 records having PersonID 1 to 10. Child1 has, say 3 records all having same PersonID, say 5. Child2 has , say 2 records, all having same PersonID, say 5. I want to create a report using DataReport (may be wiith DataEnvironment also) in VB6. The output in report should be like below:
Record1 of Parent
Record2 of Parent
.
.
Record5 of Parent
Record1 of Child1
Record2 of Child1
Record3 of Child1
Record1 of Child2
Record2 of Child2
Record6 of Parent
.
.
Record10 of Parent

For this I think I have to use Shape, Append & Relate commands in the form but don't know how to relate TWO child tables with Parent table.
Please help me.
Thanks in advance.

Always Believe in GOD!
Jan 29 '08 #1
6 1457
debasisdas
8,127 Expert 4TB
simply try to use UNION in sql.
Jan 29 '08 #2
Killer42
8,435 Expert 8TB
simply try to use UNION in sql.
Yes, you can UNION the two child tables so they look like one big one.
Jan 29 '08 #3
smartchap
236 100+
Dear debasisdas and killer42
UNION is used when both the tables have similar fields. But in my case they have different different fields.
I used SHAPE command with APPEND and RELATE, it works well with 1 parent & 1 child table, but don't know how to use with one parent & two child tables.
If there is any other method please help.
Jan 30 '08 #4
debasisdas
8,127 Expert 4TB
Since you are selecting one particular field only that should not be a problem.

Only they must have same datatype .
Jan 30 '08 #5
Killer42
8,435 Expert 8TB
I used SHAPE command with APPEND and RELATE, it works well with 1 parent & 1 child table, but don't know how to use with one parent & two child tables. If there is any other method please help.
Sorry, you've gone way beyond my SQL knowledge now. I've never even seen SHAPE or RELATE.
I hope someone else here can help. Also, I'd recommend posting your question in the Access forum, as the real database experts tend to hang around over there.
Jan 30 '08 #6
smartchap
236 100+
Dear debasisdas
All the tables have different different fields and have only one common field PersonID.
Feb 1 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Suzanne Vogel | last post by:
Hi, Given: I have a class with protected or private data members, some of them without accessor methods. It's someone else's class, so I can't change it. (eg, I can't add accessor methods to the...
5
by: Zürcher See | last post by:
The Control class has the Parent property that is readonly. When the control is added to a controls collection of another control the Parent property refers to that control. "Who" set the Parent...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
2
by: Roy | last post by:
Ok, this is incredibly annoying. Below I have an ImageButton and it's ImageButton_Click sub. See the 6 response.writes? The output for them is displayed below in asterisks. Question: What part of...
4
by: Phil Powell | last post by:
I thought this would work but it seems to not work neither in Netscape nor in IE: <script type="text/javascript"> <!-- // OBTAINED FROM http://www.javascripter.net/faq/settinga.htm //...
6
by: Ray Schumacher | last post by:
What is the feeling on using "parent" in a class definition that class methods can refer to, vs. some other organization ? Should all relevant objects/vars just be passed into the method as needed?...
2
by: Steven | last post by:
I have a page(pg1) which contains a select list (list1) in a form(form1) and an iframe(frame1), in this iframe is a page(pg2) with another select list(list2) in a form(form2) and I transfer the...
5
by: gnewsgroup | last post by:
In my user control, I would like to find a Label control in the parent page (the page that uses my user control). I need to update that Label.Text when something happens in the user control. I...
1
by: bnchs | last post by:
This is C code. I am trying to fill each node's Parent field with its parent because I am drawing nodes to the screen. However, I have not been able to get this working. Reading the output from the...
4
by: Andrew | last post by:
I want to create a set of Activity Diagram controls for process control. I need to create a base Diagram control that acts as a container for the Activity controls ( StartPoint, EndPoint,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.