Date format

L

Lene

I'd like to be able to enter 51205 in access database date/time field with a
return of 5/12/2005 when I go to the next field, without having to type the
zero first for any single digit month or day. I'm having no luck with the
input mask as it always brings back an error message. I've also used 9, 0,
and #. Is there a way
 
D

DL

I guess you would have to use on exit code so that if you entered 51205 it
would convert it to the correct format, but the display format would still
show 05/12/2005. You would then also have to code for the single digit
month, but it would still display as 05/02/2005.
So the simple answer is to enter the date correctly in the first place ie
050205 - a double digit year will be automatically converted to 2005
 
A

Arvin Meyer [MVP]

The 4 digit year is set in the Windows Regional Settings in the Control
Panel. If you do that, and clear any input masks, you can simply use the
following keystrokes to enter 5/12/2005 and go to the next field:

5 Spacebar 12
Enter/Return

which is even 1 less keystroke than you require.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
L

Lene

Thank you, thank you. Clearing input masks seems to be the simplest way to
go and works great. Appreciate all of you all's help.
 
Top