If mytree Is Nothing Then ReturnDim tv As WinForm.TreeView = mytreeIf e.Table.Current IsNot Nothing Then For Each node As WinForm.TreeNode In tv.AllNodes If e.Table.Current("Code") = node.FullName tv.SelectedNode = node Exit For End If NextEnd If