I have a wizard that has two pages to it.
In the first page the user selects an option from a drop down combo box. The value selected fills a treeview in the second page with certain items related to the option chosen.
However when the use click back and changes the item selected in the combo box the treeview does not "refresh" but instead simply adds the new items in addition to the values already populating the treeview nodes.
What I need is a statement that "counts" the nodes of the treeview to determin if the value is greater than 0 and if it does to run some kind of clear function to remove the existing nodes.
I simply dont know what the proper methods and form of the code would look like.
IN short it should function something along the lines of an If Then
If Me!Treeview.Nodes.Count > 0 Then
Me!Treeview.Clear
Else
Rest of code....
End If
Something along those lines but I dont know what the methods are going to be nor do I know the structure of the code because I cant find decent documentation on treeview objects.
In the first page the user selects an option from a drop down combo box. The value selected fills a treeview in the second page with certain items related to the option chosen.
However when the use click back and changes the item selected in the combo box the treeview does not "refresh" but instead simply adds the new items in addition to the values already populating the treeview nodes.
What I need is a statement that "counts" the nodes of the treeview to determin if the value is greater than 0 and if it does to run some kind of clear function to remove the existing nodes.
I simply dont know what the proper methods and form of the code would look like.
IN short it should function something along the lines of an If Then
If Me!Treeview.Nodes.Count > 0 Then
Me!Treeview.Clear
Else
Rest of code....
End If
Something along those lines but I dont know what the methods are going to be nor do I know the structure of the code because I cant find decent documentation on treeview objects.