1、下载最新的版本,代码改为:
If e.Form.Controls("DateTimePicker1").Value Is nothingThen
MessageBox.Show("请录入访问日期","提示")
Return
End If
If e.Form.Controls("DateTimePicker2").Value Is Nothing Then
MessageBox.Show("请录入出生日期","提示")
Return
End If
2、这种代码设置在Enter事件中比较好,因为不是每次但是单击鼠标进入系统的
[此贴子已经被作者于2011-11-24 16:28:17编辑过]