Private Sub Treeview_NodeClick(ByVal Node As Object)
Dim str As String
If Node.Text = "工程资料" Then
str = ""
ElseIf Node.Key Like "2nd*" Then
str = "[项目名称]='" & Node.Text & "'"
ElseIf Node.Key Like "3rd*" Then
str = "[资料名称]='" & Node.Text & "' and [项目名称]='" & Node.Parent & "'"
Else
str = "[单位名称]='" & Node.Text & "' and [资料名称]='" & Node.Parent & "' and [项目名称]='" & Node.Parent.Parent & "'"
End If
Me.文件N子窗体.Form.Filter = str
Me.文件N子窗体.Form.FilterOn = True
End Sub