以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 筛选 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=856) |
||||
-- 作者:fxdf -- 发布时间:2008/10/13 20:48:00 -- 筛选
子窗口中有“拼音”姓名,电话三个选项,在其中任一个或多个中输入内容后,按钮进行筛选,并切下次筛选时不需要按显示所有行就可以从所有数据中筛选 请指教代码应如何写 另筛选后如何显示有多少条符合条件的记录 [此贴子已经被作者于2008-10-13 20:54:51编辑过]
|
||||
-- 作者:czy -- 发布时间:2008/10/13 21:46:00 --
Tables("表A").ApplyFilter = False Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then Filter = "b = \'" & .Value & "\'" End If End With With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "c = \'" & .Value & "\'" End If End With With e.Form.Controls("TextBox3") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "d = \'" & .Value & "\'" End If End With If Filter > "" Then Tables("表A").Filter = Filter End If [此贴子已经被作者于2008-10-13 23:03:50编辑过]
|
||||
-- 作者:fxdf -- 发布时间:2008/10/13 22:08:00 -- 谢谢您的热心帮助,再麻烦一下,如果“电话”想用“包含”不用“等于”应如何? 另筛选后如何显示有多少条符合条件的记录 |