Condtional Format Quirk (1 Viewer)

BitsOfBytes

Registered User.
Local time
Today, 09:44
Joined
Apr 14, 2015
Messages
15
Ugh. I hate asking for help but google isn't solving this one.

This DB is connected to a SQL server table. The table is tracking oil samples that have been taken for equipment.

The field is data is coming from an IIf() statement and that may be my problem. The reason it is an IIf() is because I needed some logic to display what I want. If the item has had an oil sample before, the next calculated due date will show up in this field on the report. If it has never had a sample it will say "no sample on file" instead of a date. If it doesn't require sampling it will say "No Sample Required. The picture may help to understand. There are 5 separate items being sampled on each piece of equipment, but each does not necessarily need to be sampled (all items do not have hydraulics). This report tells the user what samples have not been collected or are overdue.

As you can see, the dates are both showing Red. There is only one conditional format set for Value<Date(). But overdue and non-overdue dates are showing red. I basically want all text to be black unless it is an overdue date.

If the next sample is overdue I want the date to be formatted red. This has normally been easy in the past. Now if I do Value<Date() any date shows up red.
 

Attachments

  • Report.PNG
    Report.PNG
    44.9 KB · Views: 95

plog

Banishment Pending
Local time
Today, 08:44
Joined
May 11, 2011
Messages
11,696

BitsOfBytes

Registered User.
Local time
Today, 09:44
Joined
Apr 14, 2015
Messages
15
Thanks for the reply. I have been trying to use the IsDate function to test weather it is a date first, but I have never used IsDate in conditional formatting before.

If I do IsDate([MyField]) in conditional formatting and set it to green the test works (only the records that are dates show up as green). How do I test it is is a date and then if it is overdue in the conditional format expression?
 

plog

Banishment Pending
Local time
Today, 08:44
Joined
May 11, 2011
Messages
11,696
You nest them:

If(IsDate(YourDate), If(DateValue(YourDate)<Date(), 1, 0), 0)=1
 

Users who are viewing this thread

Top Bottom