Hi,

in the following code I can create a TreeView control with only one Root and only one branch. Please change or ammend this code to be able to make the branch as a root of another branch and so on.. I mean Treeview with unlimited levels.
You can suggest any new variables or objects

Do While Not rsCategories.EOF
Me.ctlTreeView.Nodes.Add , , "Cat" & rsCategories("CategoryID"), rsCategories("CategoryName") ', "category", "category"
rsCategories.MoveNext
Loop

Do While Not rsProducts.EOF
Me.ctlTreeView.Nodes.Add "Cat" & rsProducts("categoryID"), tvwChild, "Prod" & rsProducts("productid"), rsProducts("ProductName") ' "product", "product"
rsProducts.MoveNext
Loop


Thanx in advance