[AccessD] CheckDate?

Borge Hansen pcs at azizaz.com
Thu Dec 2 20:01:01 CST 2004


Hi, amazing how inexhaustible this subject is....

I have an unbound textcontrol formatted dd mmm yyyy or dd mmm yy

If I enter 32 Dec 2004 Access will cut in and tell me: Not a valid entry
etc....

If I enter 32 Dec 04 - Access interprets as 4 Dec 1932

When I test for a valid date in the beforeupdate event using IsDate() it
tests on the 4 Dec 1932 value ....

What am I doing wrong here?

Or rather : how do I catch obvious incorrect entries like 32 Dec 04 using
IsDate() before Access let them slip through?

Currently I test entry in text control box on the validation rule property:
>=#1/01/2001#
Hmmmm....


Regards
Borge



----- Original Message ----- 
From: "S D" <accessd667 at yahoo.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Wednesday, November 03, 2004 5:39 PM
Subject: Re: [AccessD] CheckDate?

> Gustav Brock <gustav at cactus.dk> wrote:
> Hi Sander
>
> > However, I added some extra checks to rule out 'impossible dates'
> > like 29,30 or 31 februari, 31 november, etc.
>
> Well, that's the point - IsDate() checks that as well!
> Both IsDate("31-11-xxxx") and IsDate("11-31-xxxx") will fail.
>
> /gustav



---
Outgoing mail is certified Virus Free by AVG Anti Virus System.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 20/11/2004




More information about the AccessD mailing list