[AccessD] Short Date Input Mask question

Gustav Brock gustav at cactus.dk
Wed Mar 17 03:45:07 CST 2004


Hi Arthur

It's not a shortcoming. Input masks are called this as their purpose
is to force the user to follow an input sequence - not to type
"something" that can be interpreted as a date string.

As Bryan has stated, one of the features of Access is that it does a
pretty good job of transferring "something" typed in a textbox into a
full date string. As such, it can assume a default year; could Access
also assume a default month (so "20" would turn into "2004-03-20") we
would approach Paradise.

Having said that, I once used input masks for entry of time on the
format hh:nn where the user can either tab into the textbox or click
at some arbitrary position in it and type ahead while preserving
default values for all digits. As you all know, input must be limited
to 0-2, 0-9 OR 0-4, 0-5 for the first three positions - not an easy
task, but it can be done. The inputmask helps as it allows you to set
the start and length of the selection no matter what the user has
typed or how he/she is editing.

/gustav


> The standard short date input mask (99/99/0000;0;_) has a shortcoming
> that I hate: you have to type 04/04/04 to get April 4th 2004. The year
> handling is nice but the month and day suck. The mask won't let you type
> 4/4/04. Is there an alternative mask that will respond intelligently to
> such input? Or should I instead just remove all the input masks from all
> the date fields?

> TIA,
> Arthur




More information about the AccessD mailing list