Formating problem with TxT field

G

Guest

Strange issue....I have a text box on a form and I have set the format to, dd/mm/yy", "hh:nn, and the input mask is, 00/00/00\ 00:00;0;
It stores the things correctly and displays it correctly, but when the field gets focus and the date is already existing it switches to the the format d/mm/yyyy, hh:nn:ss, so if you just want to back date the time by 5 min it will not allow you to leave the field as it says the format is now incorrect. At this point if you go and delete the extra characters, so that the format is correct it allows you to carry on and leave the field. Why is this and how do I resolve it
 
A

Allen Browne

Hi Derek.

Drop the input mask. They are as useful as a chocolate teapot.

An input mask does not ensure the date is entered the right way round. The
only purpose it serves is to slow down a good data entry person who knows
how to enter dates quickly (e.g. by omitting the year), and frustrate them
for forcing them to move character by character with no possibility of
inserting a character if they missed one.

If you don't believe me, try entering this date with your current input
mask:
29/02/05 00:00

For suggestions on how to prevent Access misunderstanding your dd/mm/yy date
format, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Derek said:
Strange issue....I have a text box on a form and I have set the format to,
dd/mm/yy", "hh:nn, and the input mask is, 00/00/00\ 00:00;0;_
It stores the things correctly and displays it correctly, but when the
field gets focus and the date is already existing it switches to the the
format d/mm/yyyy, hh:nn:ss, so if you just want to back date the time by 5
min it will not allow you to leave the field as it says the format is now
incorrect. At this point if you go and delete the extra characters, so that
the format is correct it allows you to carry on and leave the field. Why is
this and how do I resolve it?
 

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