Conditional Formatting Expression

  • Thread starter Thread starter Libby
  • Start date Start date
L

Libby

I would like to conditionally fromat a field to display in
red if the "approved" date is from the prior month. For
example, if this month is February, I would like all
approved dates from January to display in red, but I don't
want to have to go in and change the conditional
formatting each month to show the prior month (There are
about 6 different date fields that I would need to change
every month).

I found an expression that I have been using in queries to
display records from the prior month automatically:

Between DateSerial(Year(Date()),Month(Date())-1,1) And
DateSerial(Year(Date()),Month(Date()),0)

But this does not seem to work in the Conditional
Formatting expression box for controls.

Can you use expressions like above in conditional
formatting? Is there a way to accomplish what I need?
 
Try setting Conditional Formatting to Expression Is and using

Format([FieldName], "mmyyyy") = Format(DateSerial(Year(Date()),
Month(Date())-1, 1), "mmyyyy")
 
Back
Top