Conditional Formatting

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

Jeff Boyce

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
 
R

Rose

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

Steve Schapel

Rose,

In the Conditional Formatting dialog, select the 'Expression is...'
option, and enter something the equivalent of this:
[NameOfYourDateField]<Date()
 
L

Linq Adams via AccessMonster.com

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()
 

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