Dim Filter As String
Dim dr As DataRow = e.Node.DataRow \'获取生成此节点的行
If e.Node.name <> "显示所有" Then
Select Case e.Node.Level
Case 0
Filter = "[日期] = \'" & dr("日期") & "\'"
Case 1
Filter = "[日期] = \'" & dr("日期") & "\' And [班别] = \'" & dr("班别") & "\'"
Case 2
Filter = "[日期] = \'" & dr("日期") & "\' and [车间] = \'" & dr("车间") & " And [班别] = \'" & dr("班别") & "\'"
End Select
End If
filter = filter.Replace("#","[#]")
此主题相关图片如下:5v7$d$nwj`w}{~ib3okmn.png
MessageBox.Show(filter)
tb.Filter = Filter