各位老师,
保存时发现为空的必填字段,自动定位到为空的行,现在相实现如果左边导航窗口是关闭掉的,将导航窗口打开并自动定位到需要的节点并展开节点所在的目录树,
此主题相关图片如下:360截图20130116195825519.jpg

用了以下代码但,不起作用。
If Forms("导航").Opened = False Then
Forms("导航").Open()
End If
Dim Bar As WinForm.NavBar = Forms("导航").Controls("NavBar1")
Bar.SelectedPage = Bar.NavPages("录入审批")
Dim tr As WinForm.TreeView = Forms("导航").Controls("TreeView3")
Dim nd As WinForm.TreeNode
For Each nd In tr.nodes
If nd.name = MainTable.name Then
nd.expand()
For Each nd1 As WinForm.TreeNode In nd.nodes
If nd1.name = e.DataRow("sys_流程") Then '如果节点名称等于当前行的流程名。
tr.SelectedNode = nd1
Exit For
End If
Next
Exit For
End If
Next
要如何才能实现,谢谢!