"jer84" <je*******@gmail.comwrote in
news:11**********************@p79g2000cwp.googlegr oups.com:
Hello
I would like to be able to keep a list of all the parts that
are on a piece of equipment. I have a table of all the
equipment (about 50) and a table of all the parts (hundreds).
This would be a many-to-many relationship since each peice of
equipment can have any number of parts and each part may be
found on any number of equipment. How do I relate these two?
My first thought was to make a table for each peice of
equipment, but I'm thinking that there has to be a better way.
i've never related a many-to-many before. I'm obviously new to
Access and would like to learn how this can be done.
Thank you for you help
Jer
Basically, you create two tables, PARTS, which contains one row
for each part, and a second table which contains
ParentPart,ChildPart,Quantity and optionally a reference
designator or serial number. I've seen this named Assmbly, BOM
or Structure. The primary hey for this is an index on both
ParentPart and ChildPart
parentPart ChildPart Qty
Part1 Part2 1
part1 Part3 6
Part2 Part3 12
A ParentPart may also be a childPart, and the issue is to go
through the structure, calling out each child recursively until
there are no more children. You can write this off to a
temporary table or to a treeview list, or just print it out.
Part1
..Part2,1
...Part3,12
..Part3,6
etc.
research info on creating a Bill of Materials database.
http://groups.google.com/group/comp.databases.ms-
access/browse_frm/thread/297c01f1d5257aef/818b9d061280179e?
lnk=gst&q=quintal+Explosion&rnum=3#818b9d061280179 e
is also
http://tinyurl.com/ntfgx
shows one way to do that. iirc, the code needs a little
tweaking.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com