Hi Guys,
I have a form i use to enter information on equipment assessments. There are three text boxes on the form which i would like to make sure that the user actually fills in. I've tried using the data validation thing in the table properties but that doesn't give me an error until the whole form is filled in. I'd like something that will alert the user as soon as he/she moves out of the text box in question. I've been using the code below in the AfterUpdate event of the Form itself but no luck.
I'd appreciate any advice,
Thanks,
Emma
I have a form i use to enter information on equipment assessments. There are three text boxes on the form which i would like to make sure that the user actually fills in. I've tried using the data validation thing in the table properties but that doesn't give me an error until the whole form is filled in. I'd like something that will alert the user as soon as he/she moves out of the text box in question. I've been using the code below in the AfterUpdate event of the Form itself but no luck.
Code:
Private Sub Form_AfterUpdate()
If IsNull(Me.AssessmentID) Then
MsgBox "You must enter an Assessment Number."
Me.AssessmentID.SetFocus
Cancel = True
End If
End Sub
I'd appreciate any advice,
Thanks,
Emma