你代码的数字写错了
Dim Value() As String Value = e.Node.FullPath.Split("\") Select Case e.Node.Level Case 0 Tables("表A.表B").Filter = "[订单号] = '" & Value(0) & "'" Case 1 Tables("表A.表B").Filter = "[订单号] = '" & Value(0) & "' And [物料类别] = '" & Value(1) & "'" Case 2 Tables("表A.表B").Filter = "[订单号] = '" & Value(0) & "' And [物料类别] = '" & Value(1) & "'And [物料代号] = '" & Value(2) & "'" Case 3 Tables("表A.表B").Filter = "[订单号] = '" & Value(0) & "' And [物料类别] = '" & Value(1) & "'And [物料代号] = '" & Value(3) & "'And [序号] = '" & Value(2) & "'" End Select
|