condional formatting on a date

waredata

New member
Local time
Today, 07:11
Joined
Apr 19, 2011
Messages
9
Access 2007 - I have a text box for [ExpDate] , input format is 0\4/\10;0; formatted as mm/yyyy.
Question is I need to know if the date entered is less than current month to be highlighted.

Conditional Formatting: Condition 1; "Field Value Is", less than, What do i put in the next box? < current Month
 
Just to note - formatting to mm/yyyy doesn't help in this case. If you used yyyymm instead then it would be usable. The text box should have the entry as yyyymm as well really. Then it would simplify matters greatly.

But, we can get past that. In your conditional formatting use EXPRESSION IS instead of Field Value is:

Conditional Formatting: Condition 1; "EXPRESSION IS"

and the expression would be:

CLng(Mid([ExpDate], 3) & Left([ExpDate])) < CLng(Format(Date(), "yyyymm"))
 

Users who are viewing this thread

Back
Top Bottom