Validation Rule

A

AndyK

Hi All,

I want to set up a validation rule to restrict entries on a text field to
the folloiwng format:

Friday, 4 April 2005

Thursday, 11 January 2005

Any ideas. I have tried a rule along the lines of

Like "*day," but this does not do the job.

Cheers,

Andy
 
A

AndyK

The date field does not work with my input form. I have had trouble with a
date picker. It works with a text field but not a date field. Thanks anyway.
 
A

Allen Browne

Access will spin the entry around if it does not make sense in the format
expected. For example, if you enter:
29/2
this year, Access spins it around to 1 Feb 2029, because that's as much
sense as it can make of the entry.

You cannot force the user to enter the date in that format unless you use an
unbound control, or a combo where the bound column is zero-width.

Not that it makes sense to try: it would take far too many keystrokes to
force the user to enter the long date.

If you are trying to prevent problems with the Australian date format, see
this article:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
It comes from 12 years experience working with Access in Australia.
 
A

Allen Browne

Yes, you're right. He did say this was a texrt field.

I wonder why he is doing that, and then trying to force only dates into the
field. Strange.
 
A

AndyK

It won't write to the date field. I simply get a message tellig me that the
query is not updateable. I guess it is a probnlem with the code and my
limited experience has not allowed me to fix it/

Andy
 
A

AndyK

Thanks. A great article.
Allen Browne said:
Access will spin the entry around if it does not make sense in the format
expected. For example, if you enter:
29/2
this year, Access spins it around to 1 Feb 2029, because that's as much
sense as it can make of the entry.

You cannot force the user to enter the date in that format unless you use
an unbound control, or a combo where the bound column is zero-width.

Not that it makes sense to try: it would take far too many keystrokes to
force the user to enter the long date.

If you are trying to prevent problems with the Australian date format, see
this article:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
It comes from 12 years experience working with Access in Australia.
 
A

AndyK

I reckon your right. It was a last ditch effort. I am using a date picker to
enter via an asp web page to an access database. I set the database up with
a date field but could not write to it using the date picker. I am sure my
coding was wrong here, but as a result I resorted to uisng a text field. It
writes to the tect field without any problems.

Sorry if I appear to be a bit of a moron. If you can help that would be
great.

Andy
 
A

AndyK

Thanks. Will look at that. The input form is an ASP page. Not sure of the
problem is there.
 
Top