Date format behavior

  • Thread starter Thread starter John J.
  • Start date Start date
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
 
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).
 
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
 
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.
 
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
 
Back
Top