D
Douglas J. Steele
Okay, that makes sense. Sorry about that (I didn't bother testing).
Change the BeforeUpdate to
Private Sub PayDate_BeforeUpdate(Cancel As Integer)
If IsDate(Nz(Me.PayDate, "X") = False Then
Cancel = True
End If
End Sub
Change focus in the AfterUpdate event:
Private Sub PayDate_AfterUpdate()
Me!NameOfSubformControl.SetFocus
Me!NameOfSubformControl.Form!NameOfControlOnSubform.SetFocus
End Sub
Change the BeforeUpdate to
Private Sub PayDate_BeforeUpdate(Cancel As Integer)
If IsDate(Nz(Me.PayDate, "X") = False Then
Cancel = True
End If
End Sub
Change focus in the AfterUpdate event:
Private Sub PayDate_AfterUpdate()
Me!NameOfSubformControl.SetFocus
Me!NameOfSubformControl.Form!NameOfControlOnSubform.SetFocus
End Sub