Conditional Formatting- Changing Color When A Date has been Reache

L

lbjcaj

#1 Wrote in Access 2003, About Calibration Tools. I have a calibration date
that i would like to know in color. 30 days before it happens and also 15
days before. And past due calibration date turn let say RED. Hope would any
of you would write this? Thanks Lonnie *
 
A

Allen Browne

Use Conditional Formatting.

1. In design view of your form/report, click the date text box with the
mouse, and choose Conditional Formatting on the Format menu.

2. Add the conditions you need. For example, to make the control named "d"
go red if date has already passed, set Condition 1 to:
Expression [d] <= Date()
and choose the color you want.

3. Add other conditions (up to 3.)
For example, the expression:
[d] < Date() - 30
 
L

Linq Adams via AccessMonster.com

I think this will do what you need.Tou'll need to set the colors as you like.
For each Condition you use

Expression Is

Then enter the code for each condition, exactly as shown (the Conditional
Formatting is VERY PICKY!)

16-30 days in future

[CalibrationDate]>DateAdd("d",+15,Date()) And [CalibrationDate]<DateAdd("d",
+31,Date())

15 days in future

[CalibrationDate]>Date() And [CalibrationDate]<DateAdd("d",+16,Date())

Overdue

[CalibrationDate]<Date()
 
L

lbjcaj

"lbjcaj" wrote:In design view:
field value is Between Date()-30 and Date()-15....Set Color Desired.
field value is Between Date()-15 and Date().... Set Color Desired.
field value is <or= to Date()....Set Color Desired.
Works Great.
Thanks for everyone that wrote. Have a great day.
 

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