Hi there,(access newbie here)
I am trying to make a rule where the end time cannot be less than the start time. I've tried creating a validation rule in the table and have also tried the code in a before update event. I have the data type set to date time and the field names are "MondayStart" and "MondayEnd"
Private Sub MondayStart_BeforeUpdate(Cancel As Integer)
If Me.MondayStart>Me.MondayEnd then
Msgbox "The end date must not come before the Start Date"
Cancel=True ' caused the changes to not be saved
End If
End Sub
I reviewed the closest previous post on this, but it recommends a before update event.
I've tried creating the validation rule in the table, the form, and in the field in design view.
Any ideas or links to where I can get this figured out?
Thanks!