Karl Blessing
Programmer
I have here a subroutine, that populates a collection:<br><br><FONT FACE=monospace><font color=blue><br>Sub LoadAt(TheObj, HpLoc As Integer, LpLoc As Integer)<br> Dim Crn As Node<br> Dim Cn As Node<br> Dim TreeRow<br> TreeRow = UBound(TheObj, 2)<br> For j = 0 To TreeRow<br> If TheObj(HP, j) = HpLoc And TheObj(LP, j) = LpLoc Then<br> Set Cn = New Node<br> Cn.HID = TheObj(HID, j)<br> Cn.LID = TheObj(LID, j)<br> Cn.Name = TheObj(Name, j)<br> Cn.RType = TheObj(RType, j)<br> Cn.Val = TheObj(Value, j)<br> Cn.Label = TheObj(Label, j)<br> If TheObj(LP, j) = "0" Then<br> TheTree.Node.Add Cn, "~" & Cn.HID & "¦" & Cn.LID<br> Else<br> <b><font color=red>Set Crn = TheTree.Node("~" & TheObj(HP, j) & "¦" & TheObj(LP, j))</font></b><br> Crn.Node.Add Cn, "~" & Cn.HID & "¦" & TheObj(LID, j)<br> End If<br> LoadAt TheObj, CInt(TheObj(HID, j)), CInt(TheObj(LID, j))<br> End If<br> Next<br>End Sub<br></font></font><br><br>Where the Red bold is, is where my problem occurs, Now I've notice, that it'll do fine if you have a top level node, then add a child to that node, but the problem occurs when I try to use a keyname assigned to a second level node, are the nodes themselves, and the node class they contain, keep itself discrete from each other?, how can I access the key node, not matter where in the tree it'll be located?<br><br> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>