Setting up an indented bill of material list on a form

raiden_9123

New member
Local time
Today, 09:49
Joined
Oct 19, 2002
Messages
6
Hi,

I am struggling in trying to setup an indented BOM list on a form. Can anyone who has done this please help me.

My email is raiden_9123@yahoo.com

Thanks in advance
Raiden
 
Last edited:
Hi,

I managed to get a good start of the code for this, but am still having trouble getting the proper parts to display in the correct place in the idented tree

Here is a sample array that I have all of an exploded assembly. It is correct - all the proper parts are there with the correct levels. Here is the array structure:

format:

Parent,Component,Quantity,Level

data:

#29,#73,2,1
#29,1404-12-12,3,1
#73,#62,2,2
#73,070-0009,4,2
1404-12-12,#62,3,2
#62,060-6017,13,3
#62,060-6017,13,3


This is what the array looks like. When I indent this based on the level, it indents properly, but the parts are not under the correct part as you can see.

What I need to know is how I can sort this array so that the component parts are under the correct parent.

Please help. I am really struggling on this
Thanks
Raiden
 
You are going to have to create another field to control the sorting of the table. Call this field Sequence and set the autonumber to 10's. This way if you have to insert a part to the product structure you have the room in the Sequence field to do so.

OR

You can do what I did which is add a sequence number but I didn't leave any space but coded it so that when a part was inserted into the structure the Sequence field would renumber itself from that point to the end. I have posted the code under post "Copy row of fields in form view" if you are interested.

Autoeng
 
This is what I want the array to look like when sorted:


Unsorted:

#29,#73,2,1
#29,1404-12-12,3,1
#73,#62,2,2
#73,070-0009,4,2
1404-12-12,#62,3,2
#62,060-6017,13,3
#62,060-6017,13,3


Sorted:

#29,#73,2,1
#73,#62,2,2
#62,060-6017,13,3
#73,070-0009,4,2
#29,1404-12-12,3,1
1404-12-12,#62,3,2
#62,060-6017,13,3


I am really stuck on this one
 
Can an array be indented on a second field (this is getting out of my area of knowledge)? If so you could add the sequence field I discussed previously. In example:

Indent on Level, the Sequence
#29,#73,2,1 Sequence 10
#73,#62,2,2 Sequence 20
#62,060-6017,13,3 Sequence 30
#73,070-0009,4,2 Sequence 40
#29,1404-12-12,3,1 Sequence 50
1404-12-12,#62,3,2 Sequence 60
#62,060-6017,13,3 Sequence 70

Autoeng
 

Users who are viewing this thread

Back
Top Bottom