When using the calendar popup on a form with a date field(s), the red box in the calendar pop-up automatically highlights the current date. However, it is still possible to select a previous date for that field. Likewise, if you have two date fields (StartDate, EndDate) it is also possible to select an EndDate that occurs before the StartDate. How can we eliminate that possibility?
Scott Axton
@Reply 5 years ago
To the best of my knowledge you can't prevent a choice in the picker for previous to today.
You would have to check the date in the Before Update event on the form or as a TABLE-LEVEL validation rule.
[StartDate] >= Date()
[EndDate]>[StartDate]
You should be able to pick any date you want. As far as preventing an EndDate before your StartDate that's just some code you'd have to write yourself in the events in the form.
If EndDate < StartDate then
Msgbox "Error here"
' do whatever
End if
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
New Calendar Template.