[AccessD] Recursive data in treeview control

Roz Clarke roz.clarke at donnslaw.co.uk
Thu Feb 12 05:12:45 CST 2004


Thanks Gustav

I was determined to get this functionality into a rewrite of our task
management system. There is NO time for making enhancements. The boss gave
me two hours, or forget it. :/

I'm going to have to cheat, aren't I? :)

Roz

-----Original Message-----
From: Gustav Brock [mailto:gustav at cactus.dk] 
Sent: 12 February 2004 10:58
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Recursive data in treeview control


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.

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list