If e.DataCol.Name = "丝印车间" Then
If e.NewValue = Nothing Then
MessageBox.show("当前日期不能为空","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
ElseIf e.NewValue < e.OldValue Then
e.Cancel = True
MessageBox.show("当前日期只能往后填","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
或者
If e.DataCol.Name = "丝印车间" Then
Dim da1 As Date = e.NewValue
If da1 = Nothing Then
e.Cancel = True
MessageBox.show("丝印车间日期:" ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
MessageBox.show("丝印车间1","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = False
End If
End If