Conflict with short date and default input mask

D

Doug

Hi,

I created a short date field. The format is dd/mm/yyyy when displayed.
The input mask is set to 99/99/00;0 (default, I didn't type anything).
If I edit an existing date, say change 12/14/2007 to 12/15/2007, I get
an error "the value you entered isn't appropriate for the input mask."
I have to delete the "20" in the year to get it accepted, and then it
puts the 20 right back. (I have the field set to required.)

I changed 99/99/00;0 to 99/99/0000;0 and it solved the editing
problem. Why did they conflict in the first place? What I really want
is actually a 2 digit year. Is there a way to set it that way? (and
keeping it a date field - I use that value and don't want to deal with
converting a text string to a date).

Thanks
 
A

Allen Browne

If this is a Date/Time field, I suggest you remove both the Format and the
Input Mask from the field.

The input mask serves no purpose for dates, other than to really frustrate
good data entry operators who know they can enter many dates with only 3 or
4 keystrokes, such as:
3/5
Access interprets that as the current year, and determines which is one is
the month and which is the day from your Control Panel settings.

If you really want a 2-digit year, go to the Windows Control Panel |
Regional Settings, and customize Short Date so it has only yy rather than
yyyy. I don't recommend this, as it masks problems where the year is wrong.
This introduces long term problems, and saves no time at all for entering
dates in the current year.

I didn't follow your example, since you indicated you wanted dmy formatting,
but the example dates were mdy. In any case, this may help:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

Another alternative is to offer a little pop-up calendar for users to select
a date:
http://allenbrowne.com/ser-51.html
 

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

Top