Conditional Formatting Expression

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?
 
W

Wayne Morgan

Try setting Conditional Formatting to Expression Is and using

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top