以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  系统报错求助  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=74115)

--  作者:cqlistone
--  发布时间:2015/9/2 15:53:00
--  系统报错求助

Dim dr As DataRow = e.Table.Current.DataRow
Dim
wz As Integer = Tables("ABC").FindRow(dr)
If
wz >=0 Then
      Tables(
"ABC
").Position = wz
End
If

 

在副本表表事件中添加上述代码后,如果该副本表中只有一行信息,在副本表双击打开的窗口录入数据后由于自动筛选出现报错,怎么修改代码?

 

 

 

错误所在事件:ABC,CurrentChanged
详细错误信息:
未将对象引用设置到对象的实例


--  作者:大红袍
--  发布时间:2015/9/2 16:00:00
--  
if e.Table.Current is nothing then return
Dim dr As DataRow = e.Table.Current.DataRow
Dim wz As Integer = Tables("ABC").FindRow(dr)
If wz >=0 Then
      Tables("ABC").Position = wz
End If