以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]如果没有查询到,弹出提示框  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=112843)

--  作者:小老鼠
--  发布时间:2018/1/3 22:54:00
--  [求助]如果没有查询到,弹出提示框

Dim txt As String = e.Form.Controls("TextBox2").Text
Dim tbl As Table = Tables("病人表")
If txt = "" Then
    tbl.Filter = ""
Else
    txt = "\'%" & txt & "%\'"
    tbl.Filter = "姓名  Like " & txt         \'模糊查询
End If

 

如果没有查询到,弹出提示框 

如何接着这段代码往下面写


--  作者:有点甜
--  发布时间:2018/1/3 23:19:00
--  

Dim txt As String = e.Form.Controls("TextBox2").Text
Dim tbl As Table = Tables("病人表")
If txt = "" Then
    tbl.Filter = ""
Else
    txt = "\'%" & txt & "%\'"
    tbl.Filter = "姓名  Like " & txt         \'模糊查询
End If

If tbl.Rows.count = 0 Then

    msgbox("没找到")

End If