Dim dm As String = e.Form.Controls("TextBox1").Value
Dim qy As String = e.Form.Controls("区域").Value
Dim bm As String = e.Form.Controls("部门").Value
Dim dw As String = e.Form.Controls("单位").Value
Dim dr As DataRow = DataTables("Depts").SQLFind("Company = '" & qy & "' And DeptName = '" & bm & "' And UnitName = '" & dw & "'")
Dim wr As DataRow = DataTables("Depts").SQLFind("Company = '" & qy & "' And DeptName = '" & bm & "' And UnitName Is Null")
Dim pr As DataRow = DataTables("Depts").SQLFind("DeptID = '" & dm & "'")
If pr Is Nothing Then
If dw IsNot Nothing Then
If wr IsNot Nothing Then
MessageBox.Show("部门信息重复,请检查之后再输入")
Return
Else
wr.save()
End If
Else
If dr IsNot Nothing Then
MessageBox.Show("部门信息重复,请检查之后再输入")
Return
Else
dr.save()
End If
End If
Else
MessageBox.Show("部门代码重复,请检查之后再输入")
Return
End If
操作的时候会显示:
.NET Framework 版本:2.0.50727.8669
Foxtable 版本:2017.6.12.1
错误所在事件:窗口,0202部门基础新增,保存,Click
详细错误信息:
未将对象引用设置到对象的实例。
请问是什么问题?