Conditional Formatting- Changing Color When A Date has been Reache

  • Thread starter Thread starter lbjcaj
  • Start date Start date
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 *
 
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
 
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()
 
"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.
 
Back
Top