以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 求助筛选后统计问题,。。在线等。。狐爸帮忙啊。 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=32474) |
-- 作者:hsinly -- 发布时间:2013/5/2 22:18:00 -- 求助筛选后统计问题,。。在线等。。狐爸帮忙啊。 我根据帮助文件,,弄了一个筛选窗口。。。根据指定条件能够进行筛选。。。我想再加一个功能。。就是筛选的同时能够统计筛选出来的数量。。。 我的思路是,可否直接统计筛选后的表行数。。。求代码的写法。。。
|
-- 作者:hsinly -- 发布时间:2013/5/2 22:18:00 -- Dim Filter As String With e.Form.Controls("cmbxm") If .Value IsNot Nothing Then Filter = "姓名 = \'" & .Value & "\'" End If End With With e.Form.Controls("cmbxb") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "性别 = \'" & .Value & "\'" End If End With With e.Form.Controls("cmbxl") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "学历 = \'" & .Value & "\'" End If End With With e.Form.Controls("cmbgf") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "购房否 = \'" & .Value & "\'" End If End With With e.Form.Controls("cmbgc") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "购车否 = \'" & .Value & "\'" End If End With If e.Form.Controls("rdos").Checked = True \' 如果付款状态选择了"已付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "是否模特 = True" End If If e.Form.Controls("rdof").Checked = True \' 如果付款状态选择了"未付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "是否模特 = False Or 是否模特 Is Null" End If If e.Form.Controls("rdotz").Checked = True \' 如果付款状态选择了"已付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "是否体验团 = True" End If If e.Form.Controls("rdotzf").Checked = True \' 如果付款状态选择了"未付" If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "是否体验团 = False Or 是否体验团 Is Null" End If If Filter > "" Then Tables("读者数据库").Filter = Filter |
-- 作者:hsinly -- 发布时间:2013/5/2 22:32:00 -- 没人吗 |
-- 作者:y2287958 -- 发布时间:2013/5/2 22:36:00 -- Tables("读者数据库").rows.count |
-- 作者:don -- 发布时间:2013/5/2 22:37:00 -- 纸上谈兵,没文件没闲情 |
-- 作者:hsinly -- 发布时间:2013/5/2 22:42:00 -- 已解决。。。 |
-- 作者:hsinly -- 发布时间:2013/5/2 22:43:00 -- 以下是引用y2287958在2013-5-2 22:36:00的发言:
Tables("读者数据库").rows.count 呵呵。谢谢哈。。已解决 |