以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]如何追载符合条件的记录? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=121835) |
-- 作者:jeff69 -- 发布时间:2018/7/13 16:17:00 -- [求助]如何追载符合条件的记录? 老师:符合条件的记录找出来了,以集合形式将“业务编号”放在集合中,但如果用filter的话,只能显示最后一条记录,用 or 也不行,因为不知道有多少条记录。如何解决? Case "景点" Dim khmc3 As String = "%" & key.Value & "%" Dim A2 As String = DataTables("行程安排表").GetComboListString("业务编号","景点1 like \'" & khmc3 & "\' Or 景点2 Like \'" & khmc3 & "\' Or 景点3 Like \'" & khmc3 & "\' Or 景点4 Like \'" & khmc3 & "\'") MessageBox.Show(A2) Dim Values1() As String Values1 = A2.split("|") For Index1 As Integer = 0 To Values1.Length - 1 MessageBox.Show(Values1(Index1)) \' Tables("查询窗口_Table1").Filter = "业务编号 = \'" & Values(Index) & "\'" Next |
-- 作者:y2287958 -- 发布时间:2018/7/13 16:22:00 -- 用"in(\'\',\'\',\'\')"表达式 |
-- 作者:有点甜 -- 发布时间:2018/7/13 16:28:00 -- Case "景点" Dim khmc3 As String = "%" & key.Value & "%" Dim A2 As String = DataTables("行程安排表").GetComboListString("业务编号","景点1 like \'" & khmc3 & "\' Or 景点2 Like \'" & khmc3 & "\' Or 景点3 Like \'" & khmc3 & "\' Or 景点4 Like \'" & khmc3 & "\'") Tables("查询窗口_Table1").Filter = "业务编号 in (\'" & a2.Replace("|", "\',\'") & "\')" |
-- 作者:jeff69 -- 发布时间:2018/7/13 16:47:00 -- 太佩服老师了! |