hello everyone,
I am trying to load a treeview (ya still) and I get it to load the child no problem, but I want to load the field that is empty as a folder child. this is my code.
ok it loads child nodes if the field ParentID > 0, but the folder child I want to load is also greater than 0 so I was trying to load it by another field. I don't think this is working because it already loaded it in the previous if..then statement.Code:Dim SelectString As String
SelectString = "Select * from Routine where [Counter]= " + Label2
Set rsFiltered = dbName.OpenRecordset(SelectString)
Do While Not rsFiltered.EOF
'Add routine nodes
If rsRoutines.Fields("ParentID") > "0" Then
tvwMain.Nodes.Add "Routine" & rsRoutines("ParentID"), _
tvwChild, "Routine" & rsFiltered("counter"), _
rsFiltered("Routine"), "code", "codered"
'Else
If rsRoutines.Fields("Description") = Null Then
tvwMain.Nodes.Add "Routine" & rsRoutines("ParentID"), _
tvwChild, "Routine" & rsRoutines("counter"), _
rsRoutines("Routine"), "closed", "open"
End If
End If
rsFiltered.MoveNext
Loop
rsRoutines.MoveNext
Loop
'Code improved by vBulletin Tool (Save as...)
How do I change it to load if ParentID > 0 but if the Description field if empty to load it as folder child. does any of that make since?
TIA
