以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 目录数查询报错,怎么解? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137083) |
-- 作者:fox-man -- 发布时间:2019/6/27 18:43:00 -- 目录数查询报错,怎么解? Dim Value()As String Dim Filter As String Value = e.Node.FullPath.Split("\\") S e l e c t Case e.Node.Level Case 0 Filter ="level1Departments = \'" & Value(0) & "\'" Case 1 Filter ="level1Departments = \'" & Value(0) & "\' And level2Departments = \'" & Value(1) & "\'" Case 2 Filter ="level1Departments = \'" & Value(0) & "\' And level2Departments = \'" & Value(1) & "\' And level3Departments = \'" & Value(2) & "\'" Case 3 Filter ="level1Departments = \'" & Value(0) & "\' And level2Departments = \'" & Value(1) & "\' And level3Departments = \'" & Value(2) & "\'And level4Departments = \'" & Value(3) & "\' " Case 4 Filter ="level1Departments = \'" & Value(0) & "\' And level2Departments = \'" & Value(1) & "\' And level3Departments = \'" & Value(2) & "\'And level4Departments = \'" & Value(3) & "\'And level5Departments = \'" & Value(4) & "\' " Case 5 Filter ="level1Departments = \'" & Value(0) & "\' And level2Departments = \'" & Value(1) & "\' And level3Departments = \'" & Value(2) & "\'And level4Departments = \'" & Value(3) & "\' And level5Departments = \'" & Value(4) & "\' And level6Departments = \'" & Value(5) & "\' " End S e l e c t Tables("窗口1_table1").Fill("S E L E C T * FROM table where isnull (level1Departments,\'\') = \'"& Value(0) &"\' and isnull(level2Departments,\'\') = \'"& Value(1) &"\' and isnull(level3Departments,\'\') = \'"& Value(2) &"\' and isnull(level4Departments,\'\') = \'"& Value(3) &"\' and isnull(level5Departments,\'\') = \'"& Value(4) &"\'","SALE",True)
|
-- 作者:有点甜 -- 发布时间:2019/6/27 19:00:00 -- 改成
Tables("窗口1_table1").Fill("SELECT * FROM table where " & filter, "SALE", True) [此贴子已经被作者于2019/6/27 18:59:57编辑过]
|