Foxtable(狐表)用户栏目专家坐堂 → [求助]各位大神帮忙看看,提示引用的未设置到对象实例


  共有2161人关注过本帖树形打印复制链接

主题:[求助]各位大神帮忙看看,提示引用的未设置到对象实例

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


加好友 发短信
等级:幼狐 帖子:163 积分:1306 威望:0 精华:0 注册:2015/6/11 22:37:00
[求助]各位大神帮忙看看,提示引用的未设置到对象实例  发帖心情 Post By:2015/6/21 20:12:00 [只看该作者]

If e.Form.Controls("品号").text="" Then
    MessageBox.Show("物料编号不能为空")
Else
    If e.Form.controls("助记码").text="" Then
        messageBox.show("助记码不能为空")
    Else
        If e.form.controls("品名").text="" Then
            messageBox.show("物料名称不能为空")
        Else
            If e.form.controls("主要仓库").text="" Then
                messagebox.show("主要仓库不能为空")
            Else
                If e.Form.controls("主供货商").text="" Then
                    messagebox.show("主供应商不能为空")
                Else
                    Dim cr As Row = Tables("品号信息").current
                    If Tables("品号信息").current.Locked = False Then
                        cr("品号")=e.ForM.controls("品号").text
                        cr("品名")=e.ForM.controls("品名").text
                        cr("助记码")=e.ForM.controls("助记码").text
                        cr("主要仓库")=e.ForM.controls("主要仓库").text
                        cr("主供货商")=e.Form.controls("主供货商")
                        cr.Locked=True
                        e.Form.Controls("品号").text=""
                        e.Form.Controls("品名").text=""
                        e.Form.Controls("助记码").text=""
                        e.Form.Controls("主要仓库").text=""
                        e.Form.Controls("主供货商").text=""
                        e.Form.Controls("品号").ReadOnly = BooleanEnum.True
                        e.Form.Controls("品名").ReadOnly = BooleanEnum.True
                        e.Form.Controls("助记码").ReadOnly = BooleanEnum.True
                        e.Form.Controls("主要仓库").ReadOnly = BooleanEnum.True
                        e.Form.controls("主供货商").ReadOnly = BooleanEnum.True
                    Else
                        Dim nr As Row = Tables("品号信息").AddNew
                        nr("品号")=e.ForM.controls("品号").text
                        nr("品名")=e.ForM.controls("品名").text
                        nr("助记码")=e.ForM.controls("助记码").text
                        nr("主要仓库")=e.ForM.controls("主要仓库").text
                        nr("主供货商")=e.Form.controls("主供货商").text
                        e.Form.Controls("品号").text=""
                        e.Form.Controls("品名").text=""
                        e.Form.Controls("助记码").text=""
                        e.Form.Controls("主要仓库").text=""
                        e.Form.controls("主供货商").text=""
                        e.Form.Controls("品号").ReadOnly = BooleanEnum.True
                        e.Form.Controls("品名").ReadOnly = BooleanEnum.True
                        e.Form.Controls("助记码").ReadOnly = BooleanEnum.True
                        e.Form.Controls("主要仓库").ReadOnly = BooleanEnum.True
                        e.Form.controls("主供货商").ReadOnly = BooleanEnum.True
                        nr.Locked = True
                    End If
                End If
            End If
        End If
    End If

 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2015/6/23 8:58:00 [只看该作者]

窗口未打开?

建议您用这个方法:
http://www.foxtable.com/help/topics/1485.htm

先找出是哪一行出错,然后分析原因,搞不定,可以在论坛发帖,贴出代码,并告诉我们运行到哪一行出错,以及错误提示。

 回到顶部