以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 查询问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132923) |
-- 作者:巷弄太过弯曲 -- 发布时间:2019/4/2 12:31:00 -- 查询问题 老师,请问我这个代码怎么修改,我这里有个查询界面 想要在姓名框里输入一个字,就可以筛选出名字中带有这个字的人 请问代码需要怎么改 开始查询代码: Dim Filter As String With e.Form.Controls("计算机部门") If .Value IsNot Nothing Then Filter = "部门 = \'" & .Value & "\'" End If End With With e.Form.Controls("IP地址") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "IP地址 = \'" & .Value & "\'" End If End With With e.Form.Controls("姓名") If .Value IsNot Nothing Then Filter = "姓名 = \'" & .Value & "\'" End If End With With e.Form.Controls("外网") If .Value IsNot Nothing Then Filter = "外网 = \'" & .Value & "\'" End If End With Tables("主窗体_计算机查询表").Filter = Filter If Tables("主窗体_计算机查询表").rows.count = 0 Then MessageBox.Show("未找到该WIFI资料") End If |
-- 作者:有点甜 -- 发布时间:2019/4/2 13:03:00 -- 参考
http://www.foxtable.com/webhelp/scr/0943.htm
http://www.foxtable.com/webhelp/scr/1523.htm
|
-- 作者:巷弄太过弯曲 -- 发布时间:2019/4/2 13:18:00 -- 老师,你推荐我参考的这个是组合框,我的是TEXTbox |
-- 作者:有点甜 -- 发布时间:2019/4/2 14:42:00 -- 把你的textbox改成combobox控件,才行。 |
-- 作者:有点甜 -- 发布时间:2019/4/2 14:43:00 -- 或者用dropbox,如
http://www.foxtable.com/webhelp/scr/2466.htm
|