Originally Posted by
offie
I'll have to think about it a little more to get exactly what you want but this is what I've got so far:
First off, your data is awful, split it into 2 tables, that that is Item - Part and another is PartA - Part B
Table 1
001 - P1
001 - p2
001 - p3
Table 2
p2 - p4
p2 - p5
So then you can join them (Part in table 1, and PartA in table 2) in a query (double click the line and make it so it includes all data from Table 1)
So you would get:
001 - p1
001 - p2 - p4
001 - p2 - p5
001 - p3
Im assuimg that the cost pf p2 will be cost of p4 +p5
Then use a union to join the costs into 1 field.
To do this I would make 2 queries
-One that has the parts that only apply to the item (in previous query specify that the 3rd field "Is Null")
-Another that only has parts that have other parts (Specify "Is Not Null", only select 1st and 3rd cloums from first query)
so you'll get
001 - p1 $
001 - p3 $
~ point of union
001 - p4 $
001 - p5 $
I know it doesn't include the name of p2 but this is all I could think of...