Good Day Access Guru's!
I was wondering if I am able to add a message warning linked to a field?
E.g. I built a training tracker with a linked table that holds the learner and the course he is enrolled on and the table has a termination date field where a termination date that must be entered when a learner terminates from the course.
Each course also has a start date and an end date.
What I want to do is to give the administrator a warning message when the incorrect date is entered into the termination date field. The incorrect date will be if the termination date is BEFORE the course start date and AFTER the course end date. In other words, the correct date should fall within those to dates.
I assume I would enter some code on the termination date field on the after update event? Please correct me if I am wrong.
I have attempted something in the line of the following:
Code:
if me.TerminationDate > me.projectstart OR < me.projectenddate then
msgBox "The Termination date cannot be before the course start date or after the course end date"
end if
If the correct date was entered then no message box should appear.
Please can someone guide me in the right direction?
Thank you in advance!