I wanna make a conditional expression in the VB6 by treeview control that can make children nodes that their parents key exist.... I read the keys from data base....my code is here...please help me...
Code:
rs.Open "select * From MatrixType", cn, adOpenStatic, adLockReadOnly While Not rs.EOF TreeView1.Nodes.Add "_" & CStr(rs!BaseID), tvwChild, "_" & CStr(rs!MatrixID), rs!MatrixName, "two" rs.MoveNext Wend rs.Close rs.Open "select * From Sample", cn, adOpenStatic, adLockReadOnly
While Not rs.EOF If TreeView1.SelectedItem = "_" & CStr(rs!MatrixID) Then TreeView1.Nodes.Add "_" & CStr(rs!MatrixID), tvwChild, , rs!SampleName ', "thire" End If rs.MoveNext
Wend