Look at Employee Tables, especially the one with a recursive Treeview example from MS. An employee can be the supervisor of another employee. The treeview shows it in a graphical format.
THis may not be what you are looking for though. I have done two databases that needed similar associations, but not into multiple layers.
I did a Configuration Management database that had a Build. Inside the build was Documents, Froms, Test Procedures, Drawings, etc. So I gave each type its own table for associating:
Tbl_DwgBuild
BuildID
DwgID
Tbl_Form
BuildID
FormID
etc.
I used a form based on the BuildID from Tbl_Build, have two listboxes on the form. The left box had the available forms, docs, dwgs, etc. (populated via an option group). Then pressing a command button associates the two together, and shows it in the right listbox using a Union query to bring in all of the different tables information.
I don't remember why I used so many tables though. For a training table, I just used a Tbl_AssociateTraining with:
TrainingID
EmployeeID
but used the same two list box format.
I could probably provide an example, but i don't know how applicable it is to parts references that can be circular and numerous.
Sean.
|