R
rmcompute
I set up a form with the BeforeUpdate event to test for various field inputs.
When the user keys in a record and presses the tab key to move to the next
field, the event fires. The result is that it keeps telling him that he is
missing fields that he didn't get a chance to enter. Is there a way to
prevent the tab key from firing the before update event. This should only
happen after he has a chance to enter all of the fields.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Lname) Then
Me.Lname.SetFocus
Cancel = MsgBox("You must enter a Last Name.", vbCritical, "Data
Validation
Failure")
End If
......
When the user keys in a record and presses the tab key to move to the next
field, the event fires. The result is that it keeps telling him that he is
missing fields that he didn't get a chance to enter. Is there a way to
prevent the tab key from firing the before update event. This should only
happen after he has a chance to enter all of the fields.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.Lname) Then
Me.Lname.SetFocus
Cancel = MsgBox("You must enter a Last Name.", vbCritical, "Data
Validation
Failure")
End If
......