T
Terri
I am trying to perform some data validation on a subform. When my if
statement is triggered I get the msgbox, AccrualStartDate is set to null but
the focus does not go to AccrualStartDate. It goes to the next field in my
tab order. Any thoughts?
Private Sub AccrualStartDate_AfterUpdate()
If Not IsNull(AccrualEndDate) And DatePart("m", [AccrualEndDate]) <>
DatePart("m", [AccrualStartDate]) Then
MsgBox "The accrual start and end date must be in the same month."
Me.AccrualStartDate = Null
Me.AccrualStartDate.SetFocus
End If
End Sub
statement is triggered I get the msgbox, AccrualStartDate is set to null but
the focus does not go to AccrualStartDate. It goes to the next field in my
tab order. Any thoughts?
Private Sub AccrualStartDate_AfterUpdate()
If Not IsNull(AccrualEndDate) And DatePart("m", [AccrualEndDate]) <>
DatePart("m", [AccrualStartDate]) Then
MsgBox "The accrual start and end date must be in the same month."
Me.AccrualStartDate = Null
Me.AccrualStartDate.SetFocus
End If
End Sub