I have a tree view that has 3 parent nodes, "Open", "Closed" and "Cancelled". Under those 3 nodes I have child nodes. When a user clicks on a child node, I need to know the tag of the node. The tag is actually the primary key of a database table. The field is called "Entry_id". I use the following code to set the tags. It works okay to add the child nodes but it sets the tag on the parent node, not the child nodes. How can I change the xxx.tag = line to set the tag for each child node?
Thanks in advance,
Shannan
'-- IF OPEN VISIT
If Trim(drData.Item("Sched_status")) = "O" Then
OpenNode.Nodes.Add(strText)
OpenNode.Tag = drData.Item("Entry_id")
End If
'-- IF CLOSED VISIT
If Trim(drData.Item("Sched_status")) = "C" Then
ClosedNode.Nodes.Add(strText)
ClosedNode.Tag = drData.Item("Entry_id")
End If
'-- IF CANCELLED VISIT
If Trim(drData.Item("Sched_status")) = "X" Then
CancelledNode.Nodes.Add(strText)
CancelledNode.Tag = drData.Item("Entry_id")
End If
Thanks in advance,
Shannan
'-- IF OPEN VISIT
If Trim(drData.Item("Sched_status")) = "O" Then
OpenNode.Nodes.Add(strText)
OpenNode.Tag = drData.Item("Entry_id")
End If
'-- IF CLOSED VISIT
If Trim(drData.Item("Sched_status")) = "C" Then
ClosedNode.Nodes.Add(strText)
ClosedNode.Tag = drData.Item("Entry_id")
End If
'-- IF CANCELLED VISIT
If Trim(drData.Item("Sched_status")) = "X" Then
CancelledNode.Nodes.Add(strText)
CancelledNode.Tag = drData.Item("Entry_id")
End If