出生日期控件ValueChanged事件代码:
If e.Form.Controls("DateTimePicker1").Value = "" Then MessageBox.Show("请录入访问日期","提示") ReturnEnd IfDim d,d1 As Dated = e.Form.Controls("DateTimePicker1").Valued1 = e.Sender.ValueIf d1 > d Then MessageBox.Show("出生日期不能早于访问日期","提示")End If