Conditional Formatting

  • Thread starter Thread starter Rose
  • Start date Start date
R

Rose

Is there a way to have conditional formatting on a date in a field if it is
past NOW(). For example if the date in the field is 12/15/2007 and todays
date is 01/15/2007, I would like it to turn blue or something that says the
date is past. Any ideas?
 
Rose

Have you looked into using the Conditional Formatting feature when your form
is in design view?

By the way, "Now()" returns both date AND time. "01/15/2007" is, possibly,
a date, if the field it's in is a date/time field.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Jeff,

I tried conditional formatting but could not figure out how to have it
format based on the current date rather then one input. Any ideas?
 
Rose,

In the Conditional Formatting dialog, select the 'Expression is...'
option, and enter something the equivalent of this:
[NameOfYourDateField]<Date()
 
I'm a little confused! You say

"For example if the date in the field is 12/15/2007 and todays date is
01/15/2007, I would like it to turn blue or something that says the
date is past."

Did you mean to say "and today's date is 1/15/2008" instead? This would make
12/15/2007 "past due."

Select your date field textbox, goto Format - Conditional Format, under

Condition1 choose Expression Is

then in the next box enter [YourDateField] < Date()

Now format the field as you like it for when the date field is in the past.

If I've misinterpreted your need, reverse the condition to read

[YourDateField] > Date()
 
Back
Top