Validation Rule

  • Thread starter Thread starter AndyK
  • Start date Start date
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
 
AndyK said:
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

Why not use a date field and then display the data anyway you want?
 
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.
 
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.
 
Allen said:
Access will spin the entry around if it does not make sense in the
format expected. For example, if you enter:
29/2

That would be true but Andy is using a text field type not date.
 
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.
 
Allen said:
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.

That's what I am wondering about. It sounds like doing it the hard way
and will regret it later.
 
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
 
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.
 
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
 
AndyK said:
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/

It sounds like a relationship problem. Take a look at the relationships
involved all the way back to the tables where the data is stored. I suspect
you will find that due to the relationships Access does not know what to do
with any changes due to the relationships and updateable questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top