What I have is basically a form, containing 1 label ("Lbl1") and 1 text box ("Txt1"). The text box is bound to a field in the table containing only dates (both future and past dates) with format YYYY-MM-DD.
What I need is the background color of both the label and the text box to turn red if the following condition is met:
The displayed date in the text box is less than 90 days from the current date. If the date in the text box is more than or equal to 90 days into the future the label and text box should keep their normal background colors which is blue for the label and yellow for the text box.
This check needs to be performed every time there is a record change in the form.
I guess I should use the "Date()" function to get today's date and then somehow subtract the current date from the date in the text box but I just can't figure out how to put the code together in practice.
Hope for some help with it.
What I need is the background color of both the label and the text box to turn red if the following condition is met:
The displayed date in the text box is less than 90 days from the current date. If the date in the text box is more than or equal to 90 days into the future the label and text box should keep their normal background colors which is blue for the label and yellow for the text box.
This check needs to be performed every time there is a record change in the form.
I guess I should use the "Date()" function to get today's date and then somehow subtract the current date from the date in the text box but I just can't figure out how to put the code together in practice.
Hope for some help with it.