I have a textbox that allows a date to be entered.
This date is checked with the code below and the background colour is changed if the date is overdue from white, yellow or red (depending on weeks)
Expand|Select|Wrap|Line Numbers
- Dim DateDifference As Integer
- DateDifference = DateDiff("ww", ApplicationDate, Date)
- ApplicationDate.BackColor = Switch(DateDifference >= 7, vbRed, (DateDifference >= 5 And DateDifference < 7), vbYellow, DateDifference < 5, vbWhite, DateDifference = 0, vbWhite)
Is there a way of refreshing/requering the code, or putting it somewhere else aswell?
Thanks