以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 筛选功能的窗口,例如产品型号,输入不完整也能找到,用什么编程语言呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=126548) |
-- 作者:lilylily -- 发布时间:2018/10/24 7:54:00 -- 筛选功能的窗口,例如产品型号,输入不完整也能找到,用什么编程语言呢? 您好,老师!我做了个筛选功能的窗口,但是只能输入完整型产品型号,实际运用中,输入不完整找到很方便,但是程序不会改,请教一下老师,帮忙指导修改一下。 Dim Filter As String With e.Form.Controls("cmbProduct") If .Value IsNot Nothing Then Filter = "产品型号 = \'" & .Value & "\'" End If End With With e.Form.Controls("cmbCustomer") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "客户姓名 = \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "厂家名称 = \'" & .Value & "\'" End If |
-- 作者:有点甜 -- 发布时间:2018/10/24 8:48:00 -- 比如
Filter = "产品型号 = \'" & .Value & "\'"
改成
Filter = "产品型号 like \'%" & .Value & "%\'"
http://www.foxtable.com/webhelp/scr/1647.htm
|