以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 帮忙看下代码怎么写? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=13654) |
||||
-- 作者:fsljhw -- 发布时间:2011/10/21 14:45:00 -- 帮忙看下代码怎么写?
请帮忙看一下附件中的窗口里的“查询\'代码怎么写,”工序这一项我不知道怎么写,还有就是想问一下,怎么才能实现模糊查询,就是说我型号里输入的型号名称不用输全也能查到!谢谢! |
||||
-- 作者:狐狸爸爸 -- 发布时间:2011/10/21 16:18:00 -- Dim Filter As String With e.Form.Controls("ComboBox1") If .Value IsNot Nothing Then Filter = "型号= \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "封装= \'" & .Value & "\'" End If End With With e.Form.Controls("ComboBox3") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & .Value & " = True" End If End With If Filter > "" Then Tables("产品库").Filter = Filter End If |
||||
-- 作者:狐狸爸爸 -- 发布时间:2011/10/21 16:23:00 -- 至于模糊筛选,用like运算符,例如这个例子用的就是模糊查询:
http://www.foxtable.com/help/topics/1534.htm
|