1、判断输入框内容是否为空:
Dim rq As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim jz As WinForm.NumericComboBox = e.Form.Controls("NumericComboBox1")
Dim sl As WinForm.TextBox = e.Form.Controls("TextBox1")
If rq.value Is Nothing OrElse jz.value Is Nothing OrElse sl.value Is Nothing
messagebox.show("日期价格数量能为空")
End If
2、其实你不用判断输入框,因为你已经绑定了,这样更简单:
Dim r As Row = Tables("表A").current
If r.IsNull("第一列") OrElse r.IsNull("第二列") OrElse r.IsNull("第三列") Then
messagebox.show("日期价格数量能为空")
End If