Up for a challenge? Displaying a tree structure

wrek

Registered User.
Local time
Today, 00:34
Joined
Jun 14, 2001
Messages
88
I have data (Bill of Materials) in a table, with this basic structure:

Parent Child Level

- A 1
A B 2
A C 2
A D 2
B E 3
B F 3
B G 3
C J 3
C K 3
E H 4
F I 4
K L 4

I want to be able to output this in a tree format, eg:

A
|_______
B
|_______
| E
| |_______
| | H
| |
| F
| |_______
| | I
| |
| G
|
|
C_______
| J
| |
| |
| K
| |_______
| L
|
D
[This tree's not coming out like it should, in the post, but you get the point...]

How can I implement this in Access? I need to display this on a form and/or report.

(Should I use a data structure? which? There is no set number of branches or nodes -- there can be many 'Levels')


Thanks in advance
 
Last edited:
You have to use the tree control, than load the nodes for each parent. It is really not all that difficult, but I would find a sample and go through it first.
 
thanks,

anyone have an example of a tree control?
 
Thanks Autoeng,

I used one of those links to build the tree (toughest challenge for me was not the tree syntax, but actually figuring out the iteration algorithm in my code, to convey the hierarchical nature of my data)

it was a great help though...thanks again
 

Users who are viewing this thread

Back
Top Bottom