Dim Filter As String
Dim nms() As String =Kfc.Split(",")
For Each cl As Col In Tables("订单").Cols
If cl.DataCol.IsBoolean Then '如果是时间列,逻辑列,数值列
Continue For '排除
End If
For Each nm As String In nms
If nm = cl.Name Then
If cl.DataCol.IsString Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "[" & cl.Name & "] Like '*" & e.Node.Text & "*'"
End If
End If
next
next
If Filter > "" Then
Tables("订单").Filter = Filter
End If
老大,我怎么修改这个字符串,可以做到底下代码的效果?
Dim Value()As String
Value = e.Node.FullPath.Split("\")
Select Case e.Node.Level
Case 0
Tables("订单").Filter ="[产品] = '" & Value(0) & "'"
Case 1
Tables("订单").Filter ="[产品] = '" & Value(0) & "' And [客户] = '" & Value(1) & "'"
Case 2
Tables("订单").Filter ="[产品] = '" & Value(0) & "' And [客户] = '" & Value(1) &"' And [雇员] = '" & Value(2) & "'"
End Select
现在是一个节点筛选的