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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add a child node

Status
Not open for further replies.

croiva25

Technical User
Dec 3, 2003
125
AU
Dear all,

Have a frustrating problem, in my treeview righclicking on the particular node gives me a pop up option "Add New" to add a new person, a child.

The code for adding a child seems to be ok as I am querying it through the Query Analyzer and the record is getting added, but my code for VISIBLY adding this/creating the actual node in my treevie is not correct, as the one I write gives me an error "Element not found"

All I want to do is to create a child for this parent!

code for my parent:
tvRelocatee.Nodes.Add "R" & CStr(nID), tvwChild, "A" & CStr(nID) & "FD", "Family Details", "Family"

Help please
Regards
[flowerface]
 
You get the error because it can't find the parent node. Code for child would be as follows:

Code:
tvRelocatee.Nodes.Add "A" & CStr(nID), tvwChild, Childs Key, "Family Details", "Family"

assumption is that "Family" referances an icon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top