Validate the firstActionDate such that it cannot be before DatetoBreackerD ate and cannot be after current date? I did the following but it does not work!?
Code:
Private Sub FirstActionDate_BeforeUpdate(Cancel As Integer)
Rem testing for Me.FirstActionDate can not be after current date
If Me.FirstAcrionDate <= Date Then
Cancel = True
Me.FirstActionDate.SetFocus
MsgBox "Please enter a date that falls prior to today's date"
Rem testing for Me.FirstActionDate can not be after DatetoBreaker date
If Me.FirstAcrionDate < DatetoBreaker Then
Cancel = True
Me.FirstActionDate.SetFocus
MsgBox "Please enter a date that falls prior to first inspection's date"
End If
End Sub
Comment