If e.Node.ParentNode Is Nothing Then
Return
End If
Dim s As StringFor Each nd As WinForm.TreeNode In e.Node.ParentNode.AllNodes If nd.Checked = True s & = ",'" & nd.name & "'" End IfNextIf s <> "" Then Tables("生产").Filter = e.Node.ParentNode.name & " In (" & s.Trim(",") & ")"End If