Access military time input mask

B

Bob

Access 2003/Input Masks/Military Time:

I would like to create an input mask in Access to format military time. The
standard long time mask requires an AM or PM be added after the time is
entered. I have tried to just use "99:00:00" and this doesn't seem to be the
answer. I also intend to do calculations for elapsed time from two time
inputs. I hope the formate will allow for a simple subtraction of one from
the other. I also hope I don't need to reset my computer to military time to
accomplish this.
 
J

John Nurick

Hi Bob,

In most cases input masks are more trouble than they're worth. Assuming
you're talking about a control bound to a Date/Time field, the best
approach IMHO is instead to use a format of
hh:nn:ss
a validation rule of
Is Null Or (>=0 And <1)
to ensure that only times between midnight and just before midnight can
be entered (as opposed to dates), and validation text something like
this
Enter a time between 00:00:00 and 23:59:59
..

Doing it this way means that everything is displayed in military time
but the user has more flexibility in how to enter it.
 
B

Bob

John: Thank you for your reply. I am a newbee, and don't understand some
things in your response. What is IMHO? (Not in Help) When you say "use a
format", where do I format within Access? I didn't see that option (on a
quick look) in the tool bar, as it is in Word and Excel, or in field
properties on the design view.

I also notice you a "titled" MS Access person. Are you available to work on
projects? If not can you point me in a direction where I might find a
mentor, and/or contractor who can complete a data base to my specs?
 
J

John Nurick

Bob,

As well as the InputMask property, Access fields and textboxes have a
Format property. It's not formatting in the sense of fonts and bold or
italic, but (like the NumberFormat property of Excel cells) controls how
a number or date is displayed.

In Table Design view, the Format property appears immediately before the
InputMask property.

In Form Design view, select the textbox, make sure the Properties sheet
is displayed, and you'll find the Format property on the Format tab.

I'm not available for contracting work, but someone else who reads this
may be.
 
D

Douglas J Steele

Since John didn't answer this question, I'll jump in.

It's an acronym for "In My Humble Opinion"

You may want to book mark a site like http://www.acronymfinder.com/ to help
with things like this.

HTH*

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bob said:
John: Thank you for your reply. I am a newbee, and don't understand some
things in your response. What is IMHO? (Not in Help)



* Hope That Helped
 
B

Bob

Thank you for your response!

Bob Moosmann

John Nurick said:
Bob,

As well as the InputMask property, Access fields and textboxes have a
Format property. It's not formatting in the sense of fonts and bold or
italic, but (like the NumberFormat property of Excel cells) controls how
a number or date is displayed.

In Table Design view, the Format property appears immediately before the
InputMask property.

In Form Design view, select the textbox, make sure the Properties sheet
is displayed, and you'll find the Format property on the Format tab.

I'm not available for contracting work, but someone else who reads this
may be.
 
B

Bob

Thanks for the response. In hindsight, I could have just asked my kids. (Who
would have know it wasn't a technical protocal.) I'm just now recognizing
"LOL" in sentences, so the acronymfinder will be a big boost up for me.

Bob Moosmann
 

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