以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  列表项目筛选的问题(模糊筛选)  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=177264)

--  作者:hongye
--  发布时间:2022/5/15 0:14:00
--  列表项目筛选的问题(模糊筛选)
Enter("ComboBox8")
Dim kh2 As WinForm.ComboBox = e.Form.Controls("ComboBox8")
Dim Filter As String
With e.Form.Controls("ComboBox7")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        If .Value > "" AndAlso .Value.Contains("-") Then
            Dim srr() As String = e.Form.Controls("ComboBox7").Value.split("-")
            Filter = "客户编号 = \'" & srr(0) & "\'and 面料名称 = \'" & srr(1) & "\'"
        Else
            Filter = "客户编号 Like \'" & .Value & "\' Or 面料名称 Like \'" & .Value & "\'"
        End If
    End If 
End With
kh2.ComboList = DataTables("窗口3_Table1").sqlGetComboListString("色号+\'-\' +颜色", Filter )

SelectedIndexChanged("ComboBox7")
Dim Filter As String
With e.Form.Controls("ComboBox7")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If 
        If .Value > "" AndAlso .Value.Contains("-") Then
            Dim srr() As String = e.Form.Controls("ComboBox7").Value.split("-")
            Filter = "客户编号=\'" & srr(0) & "\' And 面料名称=\'" & srr(1) & "\'"
        Else
            Filter = "客户编号 Like \'" & .Value & "\' Or 面料名称 Like \'" & .Value & "\'"
        End If
    End If
End With
Tables("窗口3_Table1").Filter = filter

能不能帮我看看如何筛选
[此贴子已经被作者于2022/5/15 0:15:37编辑过]

--  作者:有点蓝
--  发布时间:2022/5/15 20:13:00
--  
msgbox(filter)查看合成后的条件