I
Ian
I have a form collecting data on patients' operations in my hospital. I want
to be able to error check the date of operation entered for any inaccurate
data entry. If the date entered is in the future a message box alerts the
user to this. When they click OK they are taken to the next field in the tab
order whereas I'd like to take them back to the date field to re-enter the
correct date. Here's my code:
Private Sub DoOp_AfterUpdate()
If DoOp > Now() Then
MsgBox "You have entered a date in the future.", vbOKOnly, "Input
Error"
End If
End Sub
How can I return the user to the date field.
Thanks for any suggestions,
Ian.
to be able to error check the date of operation entered for any inaccurate
data entry. If the date entered is in the future a message box alerts the
user to this. When they click OK they are taken to the next field in the tab
order whereas I'd like to take them back to the date field to re-enter the
correct date. Here's my code:
Private Sub DoOp_AfterUpdate()
If DoOp > Now() Then
MsgBox "You have entered a date in the future.", vbOKOnly, "Input
Error"
End If
End Sub
How can I return the user to the date field.
Thanks for any suggestions,
Ian.