View Full Version : Conditional Format based on 2 Fields


matthewnsarah07
07-04-2008, 03:01 AM
I have a report which is generated from details entered into a holiday request form.
However, sometimes I get quick turnaround request where the date of the request and of the start of the holiday are very close.

On my report I have fields - [Date of Request] & [Date From]
When the report loads I would like an unbound text box called [Alert] to show Red with 'Quick Turnaround' as the value if the difference between the two fields above is 3 days or less.

How would I go about setting this up?

Thanks for your help

RuralGuy
07-04-2008, 10:50 AM
Set the ControlSource of the Alert control to:
=IIF(DateDiff("d",[Date of Request],[Date From]) < 4,"Quick Turnaround","")
...and then set ConditionalFormat of the Alert control to have a RED background if <> "".

matthewnsarah07
07-05-2008, 01:04 AM
Thanks RG - worked perfectly

RuralGuy
07-05-2008, 09:56 AM
Glad I could help.