Entering Short Time on Textbox with Existing Value

thundermane

Registered User.
Local time
Today, 23:05
Joined
Sep 23, 2011
Messages
14
In order to make data entry faster on my form, I have the following:

txtUseTime (on form detail, continuous)
ControlSource = [UseDate] (date/time field, stores both date and time)
Format = "Short Time"
InputMask = "00:00;0;_" (short time)
GotFocus event = removes the date part of any existing date/time value in field so that InputMask won't error
AfterUpdate event = brings back date part using txtDate​

txtdate (on form header)
ControlSource = unbound
Format = "Short Date" uses the date picker
value also used for another function​

On entry of new data, everything works flawlessly. I've already trained myself to use 24-hour format perfect for ShortTime.

But when editing existing date and time, Access still insists on showing the seconds, for example "11:32:00 AM" forcing me to delete the ":00 AM" part so that the InputMask will not generate an error. Is there any way to remove that ":00 AM" part so that I only have to enter time in true ShortTime fashion?
 
Set 'format' and 'input mask' both to short time in the table. If you want to change it on a form, right click the field, go to properties, and set both format and input mask to short time. It will not ask for seconds.
 
Sadly, it still does.

It only happens when there is an already existing value and I try to edit it. For new records it works fine.
 
I just discovered, tabbing to that text box works fine. But when I click on it, Access insists on displaying it as "hh:mm:ss AM/PM"
 

Users who are viewing this thread

Back
Top Bottom