.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2019.9.8.1
错误所在事件:窗口,凭证明细,Button5,Click
详细错误信息:
未将对象引用设置到对象的实例。
如果满了10行就会先出现msgbox("明细行数已满,请新增一张凭证")
然后上述出现错误提示。怎么规避
Dim r As Row = Tables("凭证").Current
If r IsNot Nothing Then
If e.DataTable.Compute("Count(凭证ID)","凭证ID = '" & r("凭证ID") & "'") >= 10 Then
msgbox("明细行数已满,请新增一张凭证")
e.Cancel = True
End If
End If