Validating dates between 2002-2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to validate dates that a user would input. The date range needs to be
from 10/01/2002 and 9/30/2005. I've tried this "between #10/1/2002# AND
#9/30/2005#" without the quotes. And I've entered an Validation Text to say
"Entered Wrong Date".

When I tried to test this it would error out when you put in a date such as
9/25/2000 but when you entered a date between the correct range it comes up
with the Error Message that you've Entered the Wrong Date. This also,
happeneds when you put in a date after 9/30/2005 such as 2006 or 2008.

The user needs to be able to entered in a date between 10/1/2002 and
9/30/2005. What would be the correct format for this?

Thanks.

Donna
 
I just tried your exact validation text in the Northwinds database in the
EMPLOYEE form for the HIRE DATE and it worked fine. Your problem is not
with the validation rule or text in your form. If you take out your
validation stuff and enter a date, does it work?


Rick B
 
Yes - but that does not Validate the dates. Doing it your way inputs All
dates not what's in the range.

I need something that will check to see if the user had entered in the right
date (10/1/2002 through 9/30/2005).

Here is what I've tried so far: (in a form to be used for data entry.)

1. Between #10/1/2002# And #9/30/2005#

2. >= #10/1/2002# And <= #9/30/2005#

3. Between Date()-896 And Date()+315 (This is based on Wednesday's date
when I created this one.)

Now according to Access all of these should work. But they don't. If you
type anything before 10/1/2002 comes up with an Error. That's fine it's
suppose to. But if you type in anything within the range it comes up with an
Error. Not OK. If you type in 10/1/2002 it takes but no other date is
allowed.

Got any ideas as to what else I could use? Would a macro work or SQL
statement? or a module?
 
Back
Top