Textbox time input autocomplete, possible?

I have a textbox with this input mask: 99:00\ >LL;0;_, its basically "##:## AM/PM".  I was wondering if it's possible to have that textbox autocomplete when for example someone enters a military time (ex. 23:00), when he tabs out of that text box, it defaults to 11:00 PM, is it possible for an unbound textbox in Access? Thanks!
jad0083Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Private Sub text1_AfterUpdate()
    Me.Text1 = Format(Me.Text1, "hh:nn am/pm")
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GRayLCommented:
If you make the format of the text box Medium time, then so long as the user enters a 'valid' time, something less than 23:59, it will get converted to the correct am/pm value.  In your case I tested with 23:00 and it converted it to 11:00 PM
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
"If you make the format of the text box Medium time,"

Well, except that Medium Time is going to depend on the medium time setting in Windows Regional and Language settings ...

mx
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

GRayLCommented:
Not quite.  I've got my regional set to the 24 hour clock.  When I select a named time format like Medium it gives the 12 am/pm setting. Both Long and Short times provide the 24 hour clock.  I've just tested and Medium time always give the 12 hr am/pm format regardless of the regional settings.
0
GRayLCommented:
mx:  BTW there is no Medium time in my Regional and Language settings...  I was giving a solution that did not require code.  However, the customer is always right ;-)
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
"BTW there is no Medium time in my Regional and Language settings."

Yes, but ... selecting Medium Time in the text box Format ... the displayed result is still impacted by the 'Time Format' in Regional and Language settings ... is what I meant to say ... I misspoke and said 'Medium Time' setting.

mx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.