Conditional formatting a date (1 Viewer)

cambridge1979

New member
Local time
Today, 23:20
Joined
Feb 15, 2017
Messages
2
SOLVED Conditional formatting a date

Dear all

I have never posted on one of these forums before, but this problem has beaten me, despite 2 days of online research to solve it!

I have a textbox field with a date in it - let's call this text1

I have a second unbound textbox designed to give me a date 90 days before the date in text1 by default. It does this fine. Lets call this unbound1.

I want unbound1 to go red when it's default date is in the past. I have used conditional formatting and entered < date().

The result: Today is 14/2/2017. Box goes red for 13/2/17

BUT

Does NOT go red for 30/1/17.

I believe the conditional formatting is not seeing the unbound1 as a date, but as a string value or something, but no idea how to put it right.

Please help. I'll be so grateful.

Ben
 
Last edited:

sneuberg

AWF VIP
Local time
Today, 16:20
Joined
Oct 17, 2014
Messages
3,506
I can't seem to duplicate your problem but then I gave the textboxes a date format and my regional setting are US, i.e. mm/dd/yyyy

I suggest using choosing Expression Is and trying

CDate( [unbound1] ) < Date()
 

cambridge1979

New member
Local time
Today, 23:20
Joined
Feb 15, 2017
Messages
2
Dear Steve

A simple solution and I didn't think of it. I was fiddling with dateVal and all sorts. I am so grateful to you. Thanks.

Ben
 

Users who are viewing this thread

Top Bottom