thisform.oleTree.SelectedItem = thisform.oleTree.Nodes("_RT"+TRANSFORM(cc1.acctgrp_id))Q2. If I undestood your question rigth you want to change the Node Text in treeView, then (If I am right)
thisform.oleTree.Nodes("_RT"+TRANSFORM(cc1.acctgrp_id)).Text = ALLTRIM(agname) && or whatever you want>I have a treeview which gets built like so:
>x2= .Nodes.ADD("_RT"+TRANSFORM(cc1.parent_id),4,"_RT"+TRANSFORM(cc1.acctgrp_id),ALLTRIM(agname)) >.Nodes(x2.INDEX).expanded=.T. > >>Question 1
"_RT"+TRANSFORM(cc1.acctgrp_id)>