Date format

  • Thread starter Thread starter Kyle
  • Start date Start date
K

Kyle

I have a field name DateReceive in my form. The format to
enter date is dd/mm/yyyy. If the user enter 12/13/2003,
the date format will switch to 13/12/2003 automatically.
However, if the date is 12/11/2003 (for Dec. 11, 2003) the
date will not swith back to dd/mm/yyyy format.

Is there a way to prevent this date format problem.
Thanks.
 
Kyle,

If the user inputs the date in the wrong format, there is
no way Access can tell that wasn't what they actually had
in their mind, unless it results in a invalid date...
(that's the law with computers... they always do what you
TELL them, not what you want!)

Tricks to avoid this:
1. Use a Date and Time Picker ActiveX control (neatest
option)
2. Change the format in the form to long date, so at least
the user will see the month name (much better chances of
realizing they got it wrong)
3. Use separate combo boxes for date, month(word), year
and combine to date in a hidden text box through a
function, or through code (most common technique on the
web).

HTH,
Nikos
 
hire new people.

nikos yannacopoulos said:
Kyle,

If the user inputs the date in the wrong format, there is
no way Access can tell that wasn't what they actually had
in their mind, unless it results in a invalid date...
(that's the law with computers... they always do what you
TELL them, not what you want!)

Tricks to avoid this:
1. Use a Date and Time Picker ActiveX control (neatest
option)
2. Change the format in the form to long date, so at least
the user will see the month name (much better chances of
realizing they got it wrong)
3. Use separate combo boxes for date, month(word), year
and combine to date in a hidden text box through a
function, or through code (most common technique on the
web).

HTH,
Nikos
 
Back
Top