Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

treeview

Status
Not open for further replies.

directorz

Technical User
Mar 4, 2003
142
US
I am exploring the use and setup of a treeview in my db. using a recursive procedure, I see there is a strpointer field, strID field and a strText field. My problem is that I have 2 tables. Table 1 has parents and children in a field. Table 2 has grandkids, so to speak. Is it possible to represent this in a treeview using a recursive procedure?

Thank you
 
I am not sure, but try to set up a relationship of the table with it-s own self or make a form and then link it to it-s own self as a subform, this is how I am running a infinite tree on my bill of materials.

Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
If you are referring to the ActiveX control, yes, create a routine that builds the highest level, and another routine that build the lower levels. This 2nd routine is recursive.

Function Parent()

Do Loop....
....
ParentID = ...
Call ChildTree (ParentID)
end loop

End Function

Function ChildTree(ChildParentID as Long)

Do Loop...
.... = ChildParentID
ParentID = ...
Call ChildTree (ParentID)
end loop

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top