Problem in Treeview control

Status
Not open for further replies.

Bluestar88

Member level 3
Joined
Oct 17, 2014
Messages
59
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
447
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
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…