以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]筛选结果条数  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=128751)

--  作者:一只田鸡
--  发布时间:2018/12/14 10:49:00
--  [求助]筛选结果条数
设计了一个筛选按钮,可以使用,现在想要在显示一共筛选出多少条数据,需要写什么代码,或者参考哪一页帮助文件呀,
请前辈们指点。
Dim filter As String
With e.Form.Controls("num1")
    If .Value <> Nothing Then
        filter &= " (开奖号码_A=\'" & .Value & "\')"
    End If
End With
With e.Form.Controls("num2")
    If .value <> Nothing Then
        filter &= " and (开奖号码_B=\'" & .Value & "\')"
    End If
End With
With e.Form.Controls("num3")
    If .value <> Nothing Then
        filter &= " and (开奖号码_C=\'" & .Value & "\')" 
    End If
End With
MessageBox.show(filter)
If e.Form.Controls("num1").Value = "" Then
    MessageBox.show("第一个数为空,无法筛选.","提示")
Else
    Tables("information").Filter = Filter
    MessageBox.show("请查看筛选结果.","提示")
End If

--  作者:有点甜
--  发布时间:2018/12/14 12:51:00
--  
    Tables("information").Filter = Filter
    MessageBox.show("请查看筛选结果.","提示")

    msgbox(Tables("information").Rows.Count)