[AccessD] Conditional Formatting

Stuart McLachlan stuart at lexacorp.com.pg
Tue Aug 13 11:33:36 CDT 2024


You confused me initially with your order
You numbered your conditions 1,2,3 but then say later that they are actaully ordered 2,1,3 :)

Incidentally, this is simpler but still works:
Date()>=[fldBidJobAnticipatedInspectionDate] - 5
as is/does
[fldBidJobAnticipatedInspectionDate] <= Date() + 5

The latter can also be done with Field Value rather than expression and seems clearer to 
me

On 13 Aug 2024 at 7:53, Rocky Smolin wrote:

> Dear List:
> 
> Client has a requirement to show different colors in a date field (fldBidJob
> *Anticipated*InspectionDate):
> 
> 1) if today's date is within 5 days make the backcolor of fldBidJob
> *Anticipated*InspectionDate yellow,
> 
> 2) if today's date is within 3 days make the backcolor of fldBidJob
> *Anticipated*InspectionDate red,
> 
> 3) if another field (fldBidJob*Actual*InspectionDate) is a date then make
> the backcolor white (IOW, of the inspection has been done, no color in the
> anticipated inspection date)
> 
> For conditional formatting for req't. 1 I use Expression is:
>       Date()>=DateAdd("d",[fldBidJobAnticipatedInspectionDate],-5)
> Works well.
> 
> For conditional formatting for req't. 2 I use Expression is:
>       Date()>=DateAdd("d",[fldBidJobAnticipatedInspectionDate],-3)
> Also works well.
> 
> For conditional formatting for req't. 3 I use Expression is:
>       IsDate([fldBidJobActualInspectionDate])
> 
> Doesn't work. The backcolor of  fldBidJob*Anticipated*InspectionDate
> remains red when there is a date in fldBidJobActualInspectionDate.
> 
> The three conditions are stacked 1) red first, 2) yellow second, 3) white
> third.
> 
> If I have only the first two conditions they both work well.
> 
> I can't figure out why the last condition doesn't work.
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list