G
Guest
here's the code:
Private Sub spFinishDate_BeforeUpdate(Cancel As Integer)
If Me.spFinishDate.Value < Me.spStartDate Then
MsgBox "Finish Date must be after start date", vbCritical
spFinishDate.Value = ""
End If
End Sub
When I enter a finish date that precedes the start date, I get the message
box. However, instead of the finish date value clearing, I get run-time
error stating "The macro or function set to the BeforeUpdate or
ValidationRule property is preventing access from saving data in the field"
Can anyone explain what I'm doing wrong here?
Thanks!
Private Sub spFinishDate_BeforeUpdate(Cancel As Integer)
If Me.spFinishDate.Value < Me.spStartDate Then
MsgBox "Finish Date must be after start date", vbCritical
spFinishDate.Value = ""
End If
End Sub
When I enter a finish date that precedes the start date, I get the message
box. However, instead of the finish date value clearing, I get run-time
error stating "The macro or function set to the BeforeUpdate or
ValidationRule property is preventing access from saving data in the field"
Can anyone explain what I'm doing wrong here?
Thanks!