以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  未设置对象变量或 With 块变量  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=98674)

--  作者:jick0526
--  发布时间:2017/4/5 3:42:00
--  未设置对象变量或 With 块变量
Select Case e.DataCol.Name
Case "第一列"
If e.NewValue.length >= 7 Then
        Dim d As Double = val(e.NewValue.SubString(6,1))
        If  d= 0 Then
            e.DataRow("第二列") = "出货"
        ElseIf d > 0 AndAlso d <= 5 Then
            e.DataRow("第二列") = "未出货"
        Else
            e.DataRow("第二列") = Nothing
        End If
    End If
End Select

老师,上面这段代码,我用电脑键盘上的Delete删除时就会出现
错误所在事件:表,表A,DataColChanged
详细错误信息:
调用的目标发生了异常。
未设置对象变量或 With 块变量,  哪里出错了,麻烦帮我看下,谢谢!

--  作者:有点蓝
--  发布时间:2017/4/5 8:46:00
--  
Select Case e.DataCol.Name
    Case "第一列"
        If e.NewValue > "" AndAlso e.NewValue.length >= 7 Then
            Dim d As Double = val(e.NewValue.SubString(6,1))
            If  d= 0 Then
                e.DataRow("第二列") = "出货"
            ElseIf d > 0 AndAlso d <= 5 Then
                e.DataRow("第二列") = "未出货"
            Else
                e.DataRow("第二列") = Nothing
            End If
        End If
End Select