Date format behavior

J

John J.

I have a table with a datetime field (format: dd-mm-yyyy hh:nn). In a form
where this field is used I have also set this format. The field's value (in
the table and in the form) shows as it should but when I click in the field
to edit it, it shows the dd-mm-yyyy hh:nn:SS format (which is too long for
my field). When I leave the field it shows the right format again. Is it
possible to get rid of this format-change-while-editing?
Thanks,
John
 
J

John W. Vinson

I have a table with a datetime field (format: dd-mm-yyyy hh:nn). In a form
where this field is used I have also set this format. The field's value (in
the table and in the form) shows as it should but when I click in the field
to edit it, it shows the dd-mm-yyyy hh:nn:SS format (which is too long for
my field). When I leave the field it shows the right format again. Is it
possible to get rid of this format-change-while-editing?

Only by using an Input Mask such as 00-00-00 00:00 (which has its own
annoyances).
 
J

Jeff Boyce

John

And replace it with what?

If your underlying date/time field is supposed to hold a date & time,
wouldn't you want to be able to edit any part of that date & time?

If you are saying you DON'T want to be changing, say, the time portion, you
might be able to use a format on the control that only displays the date
(but then why store the time portion?!).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

Rick Brandt

I have a table with a datetime field (format: dd-mm-yyyy hh:nn). In a
form where this field is used I have also set this format. The field's
value (in the table and in the form) shows as it should but when I click
in the field to edit it, it shows the dd-mm-yyyy hh:nn:SS format (which
is too long for my field). When I leave the field it shows the right
format again. Is it possible to get rid of this
format-change-while-editing? Thanks,
John

InputMask on the TextBox.
 
J

John J.

I just don't need to see or edit the seconds.

I'll fiddle some with an inputmask like John and Rick indicated. If I can't
make that work without too much annoyance, I'll stick with the current
situation.

Thanks.
John
 

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