Date format

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.
 
N

nikos yannacopoulos

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
 
D

doug_monahan

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
 

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