Force Date Entry as DD/MM/YY

  • Thread starter Thread starter Carl Jarvis
  • Start date Start date
C

Carl Jarvis

Hello

I am new to Access and I trying to write a simple database where the user
can only type in a date as DD/MM/YY. I have tried playing around with input
masks (99/99/99) but I am allowed to miss off the year (Access then assumes
the current year).

Is this easily achievable?

Many thanks to those who help.

Regards,

Carl.
 
Personally, I have found that using masks with dates does not work well.
What if the user needs to enter a date in 19xx vs. 20xx? You only let them
enter a two-digit year.

I normally let Access handle the date using the standard entry format. This
allows the user much more flexibility.

AND... It really does not matter how they enter it. Access still stores it
as a serial number that reporesents the date. You can choose to DISPALY
that date in any format you desire, regardless of how it was entered by the
user.
 
Carl Jarvis said:
Hello

I am new to Access and I trying to write a simple database where the user
can only type in a date as DD/MM/YY. I have tried playing around with
input masks (99/99/99) but I am allowed to miss off the year (Access then
assumes the current year).


As Rick said, input masks on dates can be an annoyance. You can tell users
to enter dd/mm/yy, but that doesn't mean that's how Access will interpret
it. Access uses the short date format as set in the Regional Settings of
Control Panel on each computer. You might think of just changing everyone's
computer to dd/mm/yy, however you really shouldn't change users'
preferences. Furthermore, if you enter a date that doesn't conform to the
Regional Settings, Access will 'helpfully' spin it around until it finds a
date. For instance if your computer is set for dd/mm/yy and you enter
05/31/05 - Access may store that as May 5 2031, and the user may not even
notice it. A user may enter 05/06/05 and see that on screen thinking
they've entered June 5th, however Access may have interpreted it as May 6th.

The best thing to do is to forget the input mask. More important is to set
a format that isn't ambiguous, so the user can see how Access interpreted
their entry (like dd/mmm/yyyy). Also without the input mask a user will
have fewer keystrokes for entering any date in the current year, as you
discovered.
 
Will go with that advice - if they want to screw up their own data, who am I
to stop them?

Many thanks!

Carl.
 
Back
Top