CaptainBob007
Programmer
Hi all -
I'm using Access 2000, and am working on a form for data entry and I'm trying to input some automated date comparison. I have it implemented, but it's not behaving as I think it should.
I have a text box, with the short date format, and I'm inputting a date into it. I have conditional formatting set up as so:
Then make the background red. So basically, if the date is either today or in the past, make it red, otherwise keep it the default.
Using today (7/13/2006) as an example, it works fine. if I input 7/13/2006 or 7/12/2006 it turns red, and if I put in 7/14/2006 it doesn't, just as expected.
However, if I input the date 10/1/2006 (clearly in the future) it also turns red. 9/30/2006 does not trigger this behavior. I'm thinking because "9/30/2006" starts with a 9, and "10/1/2006" starts with a 1, it somehow thinks that it is a lesser value. So basically, I don't believe it is actually comparing the dates.
Any ideas on how I can get it to behave?
I'm using Access 2000, and am working on a form for data entry and I'm trying to input some automated date comparison. I have it implemented, but it's not behaving as I think it should.
I have a text box, with the short date format, and I'm inputting a date into it. I have conditional formatting set up as so:
Code:
If Field Value Is : less than or equal to : Date()
Using today (7/13/2006) as an example, it works fine. if I input 7/13/2006 or 7/12/2006 it turns red, and if I put in 7/14/2006 it doesn't, just as expected.
However, if I input the date 10/1/2006 (clearly in the future) it also turns red. 9/30/2006 does not trigger this behavior. I'm thinking because "9/30/2006" starts with a 9, and "10/1/2006" starts with a 1, it somehow thinks that it is a lesser value. So basically, I don't believe it is actually comparing the dates.
Any ideas on how I can get it to behave?