How to update 6 tables with Parent- Child relationship?

croby

Registered User.
Local time
Today, 19:55
Joined
Feb 27, 2003
Messages
29
Hi,
I have 6 tables, Table1 to Table6. Table1 is Grand-Grand father and Table6 is Grand-Grand son. Table1 has the fields: ID (PK), Name, Desp. All other tables have the fields: ID (PK), Name, Desp, No (FK).

What kind of technique can make this work easily? Can I create a main form for Table1 and create 5 subforms for the rest tables and put them on the main form? I just read some Helptopics about subforms and am still not clear about it. The HELP says:” A main form can have any number of subforms if you place each subform on the main form.” Does this mean: I can put many subforms on the main form to build up a hierarchical form with several levels?

I am looking forward to hearing from you . Thanks a lot. Chris

:)
 
You might consider changing your approach. Take a look at the self-referencing table sample that I posted.

http://www.access-programmers.co.uk...p?s=&threadid=44272&highlight=selfreferencing

Although the sample shows only a two level reference, the same technique applies when you have multple levels. Each record references the ID of its immediate parent. You can "walk the tree" in code by using recursive programming techniques. In SQL, you'll need to pick an arbitrary depth. In your case, you want to go only 6 levels. To do that, you would add the table to the QBE grid 6 times, using left joins to connect the tables. Besure to rename the fields at each level to avoid confusion in your queries.

You should also look into using the TreeView control since it is intended to work with this type of self-referencing table and provides a nice interface for your users.
 
Linking cascading tables

Hi, Thanks for the reply. I’ve read your SelfReferencing. It is a very special one.
But I don’t know how to apply your technique to my case. I have 6 tables, non of them has a field in their parent except the FK. For these six tables I use cascading combo boxes on the entry form. Each combo is for one table. I don’t think I can put them into a single table. I think there must be a simple way to update linked tables. Suppose I create 6 tab forms, Is there any method to link them together? Please continue to help.
Thanks.Chris
 

Users who are viewing this thread

Back
Top Bottom