Hi there
Every time I add a new node and run my refresh macro, the form on the right of my screen doesnt show all records for selected nodes (just function location). I used to 'cheat' and select mother node which made the other form working again. this time maybe cause of the size of the tree (~350k nodes) it doesn't work at all.

thats my refresh macro below:
Code:
Private Sub Refreshy_Click()Dim nodSelected As MSComctlLib.Node, newNodSelected As MSComctlLib.Node
Dim newNodSelected2 As MSComctlLib.Node ' a variable for the currently selected node
Dim MyNode As Node, MyNode2 As Node
Set nodSelected = Me.TreeView.SelectedItem ' get the currently selected node
Me.TxtFunctionalLocation = nodSelected.Key
aa = nodSelected.Key
Me.TreeView.Nodes.Clear
CreateTree_Click
For Each MyNode2 In TreeView.Nodes ' that bit did my cheat to see all records in other form
If (MyNode2.Key = "Shell") Then
Set newNodSelected2 = MyNode2
newNodSelected2.Selected = True
newNodSelected2.Checked = True
Exit For
End If
Next
For Each MyNode In TreeView.Nodes 'expand tree to last selected node
If (MyNode.Key = aa) Then
Set newNodSelected = MyNode
newNodSelected.Selected = True
newNodSelected.Expanded = True
TreeView.Requery
Form.TreeLevelsSubform.Requery
Exit For
End If
Next
newNodSelected2.Selected = True
newNodSelected.Selected = True
newNodSelected.Expanded = True
newNodSelected.EnsureVisible
'newNodSelected.Expanded = True
'Me.TxtFunctionalLocation = Mid(nodSelected.Key, 6)
End Sub