以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何做搜索查询功能  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=178836)

--  作者:zhaokai721521
--  发布时间:2022/7/23 9:24:00
--  如何做搜索查询功能
如何做搜索查询功能,  怎么在表中查询条件。
--  作者:有点蓝
--  发布时间:2022/7/23 9:43:00
--  
参考:http://www.foxtable.com/webhelp/topics/1058.htm
--  作者:zhaokai123
--  发布时间:2022/7/24 16:09:00
--  做一个查询按钮
如何能弹窗提示没有找到信息呢?

Dim Filter As String
With e.Form.Controls("abc")
    If .Value IsNot Nothing Then
        Filter = "第二列 = \'" & .Value & "\'"
    Else
        MessageBox.Show ("没有找到数据", "提示", MessageBoxButtons.OK)
    End If
End With
If Filter > "" Then
    Tables("表A").Filter = Filter
End If
[此贴子已经被作者于2022/7/24 17:36:52编辑过]

--  作者:有点蓝
--  发布时间:2022/7/24 20:19:00
--  
If Filter > "" Then
    Tables("表A").Filter = Filter
if Tables("表A").rows.count = 0 then
MessageBox.Show ("没有找到数据", "提示", MessageBoxButtons.OK)
end if
End If