Private Sub Treeview_NodeClick(ByVal Node As Object)
Dim str As String
IF str = "[名称]='" & Node.Text & "'" Then
Me.Form.FilterOn = True
Me.Form.Filter = str
END if
把代码改成这样试试看(我也是在学习,共同探索吧)
Private Sub Treeview_NodeClick(ByVal Node As Object)
Dim str As String
If Node.Text = "[名称]" Then
str = "[名称]='" & Node.Text & "'"
Else
str = ""
End If
Me.Form.FilterOn = True
Me.Form.Filter = str
End Sub