Dim hwh2 As DataRow = e.DataRow
If e.DataCol.Name = "货位号" Then
msgbox(3)
hwh2 = e.DataTable.Find("货位号 = '" & e.NewValue & "'And 货位号 not In ('77777777', '88888888', '99999999') ")
msgbox(2)
If hwh2("货位号") IsNot Nothing Then
MessageBox.Show("此货位号已经存在!")
If hwh2("商品编号") =e.DataRow("商品编号") AndAlso hwh2("批号") =e.DataRow("批号") Then
MessageBox.Show("此货位号可以使用!")
Else
MessageBox.Show("此货位号已经占用!")
e.Cancel = True
End If
End If
End If
测试了下,输入77777777或者88888888或者99999999就弹出错误报告
.NET Framework 版本:2.0.50727.3655
Foxtable 版本:2018.3.9.1
错误所在事件:表,库存,DataColChanging
详细错误信息:
Exception has been thrown by the target of an invocation.
Object reference not set to an instance of an object.
求教下这个错在哪里了
[此贴子已经被作者于2018/5/22 10:50:07编辑过]