求助帅选树问题?
AfterCheckNode
改变节点复选框状态后执行。
代码如下,编译总是过不去,错误提示:未声明牵头单位
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
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 "
End If
Select Case nd.Level
Case 0
flt = flt & "案件类别 = '" & nd.DataRow("案件类别") & "'"
Case 1
flt = flt & "案件类别 = '" & nd.DataRow("案件类别") & "'" And 牵头单位 = '" & nd.DataRow("牵头单位") & "'"
End Select
End If
Next
Tables("案件办理").filter = flt