Foxtable(狐表)用户栏目专家坐堂 → 表的currentchanged和查询按钮的冲突问题


  共有2381人关注过本帖平板打印复制链接

主题:表的currentchanged和查询按钮的冲突问题

帅哥哟,离线,有人找我吗?
guosheng
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
表的currentchanged和查询按钮的冲突问题  发帖心情 Post By:2018/10/17 13:34:00 [只看该作者]

查询”按钮的结果为空时,会提示“currentchanged事件,未将对象引用为对象实例”。该怎么调整啊?谢谢。
在currentchanged事件中加入:(1)If e.Table.Current Is Nothing Then Return 可以解决错误提示。
但是在currentchanged事件中加入:(2)
Dim dr As DataRow = e.Table.Current.DataRow
If dr Is Nothing Then Return
为什么(1)可以解决错误提示,(2)确不能解决错误提示啊  (1)和(2)感觉区别不太吧。



1、“查询”按钮的click事件:
Dim nms() As String=……
Dim sps() As String=……
Dim bjf() As  String=……
Dim fds() As String=……
Dim filter As String
……
2、窗口副本表的currentchanged事件:
Dim dr As DataRow = e.Table.Current.DataRow
Dim wz As Integer = Tables("合同基本信息表").FindRow(dr)
If wz >=0  Then
      Tables("合同基本信息表").Position = wz
End If
[此贴子已经被作者于2018/10/17 14:00:19编辑过]

 回到顶部