以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  未将对象引用设置到对象的实例  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=84434)

--  作者:kmzb56
--  发布时间:2016/5/1 23:51:00
--  未将对象引用设置到对象的实例


模糊查询时,找不到行时,会提示:未将对象引用设置到对象的实例 请问哪里出错了?

 Dim txt As String = e.Form.Controls("TextBox1").Text
 Dim tbl As Table = Tables("司机资料开单_Table1")
  If txt = "" Then
    tbl.Filter = ""
  Else
    txt = "\'%" & txt & "%\'"
    tbl.Filter = "司机姓名 Like " & txt 
  End If




--  作者:大红袍
--  发布时间:2016/5/2 11:54:00
--  

CurrentChanged事件有问题。在前面加上下面的代码

 

If e.Table.Current Is Nothing Then return