[AccessD] Recursive data in treeview control

Gustav Brock gustav at cactus.dk
Thu Feb 12 04:57:53 CST 2004


Hi Roz

Lookup "Tree shaped reports" from 2002-06-02 in the archive.
Maybe my function RecursiveLookup() can guide you ...

Two hours? How is work planned at your place? Not?

/gustav


> Hiya

> Does anyone have any code for recursively populating a treeview control? I
> have a table like this:

> TaskID          ParentID        Description
> 1               0               fleg
> 2               1               subfleg a
> 3               1               subfleg b
> 4               2               sub-subfleg a

> and so on. I don't want to limit the number of levels.

> I can see that I need to run through the dataset and populate the treeview
> with the first level, then do it again n times until all the children are
> added at the appropriate level, skipping any record already added as a node.

> I'm in a hurry - I have 2 hours to nail this (working hours not real-time)
> so although it feels lazy and I would love to crack this on my own, if
> anyone has done it before I would appreciate any help you can give.



More information about the AccessD mailing list