老师你好,我按照帮助里面的代码学习目录树筛选的时候,当副本为false时,目录树有效,但是当副本为true的时候,就体现不了目录树筛选作用了
我修改Tables("入库单父子表").Filter = flt为Tables("入库单父子表_table1").Filter = flt,也依然无解,请老师指点。
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String
For Each nd As WinForm.TreeNode In e.node.Nodes '清除子节点选中状态
nd.Checked = False
Next
If e.node.ParentNode IsNot Nothing Then '去掉父节点选中状态
e.node.ParentNode.Checked = False
End If
For Each nd As WinForm.TreeNode In trv.AllNodes
If nd.Checked Then
If flt > "" Then
flt = flt & " Or " '注意用or而不是And
End If
If nd.Level = 0 Then '注意下面的条件都要用括号括起来
flt = flt & "( 供货商 = '" & nd.Text & "')"
Else
flt = flt & "( 供货商 = '" & nd.ParentNode.Text & "' And 单号 = '" & nd.Text & "')"
End If
End If
Next
Tables("入库单父子表").Filter = flt