Time Input Mask

D

Dawn

I need help with an input mask for a table that will
display the time as hh:mm a.m. (without the seconds). I do
not want to make any changes to the regional time in
Windows.

Thanks for your help.
 
T

Tim Ferguson

Set the field to Med Time.
Use the following Input Mask:
09:00\ >LL;0;_

Close, but use the Format property rather than the Input Mask (which only
controls the user's keystrokes, not the display),

Format = "hh:nn am/pm"

Hope that helps


Tim F
 
L

Liz

Thanks Tim, not sure I see the diff between that and
setting the field to Med time and using the input mask
property along with it.
What am I not getting?
 
T

Tim Ferguson

Thanks Tim, not sure I see the diff between that and
setting the field to Med time and using the input mask
property along with it.
What am I not getting?

The Input Mask has no effect on the data stored or how it is displayed:
it's only a method of restricting the user's keystrokes. The facts that
it's counter-intuitive, different from every other data entry control in
the Windows universe, and generally confuses and irritates the users are
additional reasons why it's a Bad Thing. My hypothesis is that the Access
team put it in as a sop to old Paradox users who found it difficult to
orient themselves in a real database platform.

Setting the Format to Medium Time still leaves the format vulnerable to
whatever is set in the Control Panel. This can be a good thing or a bad
thing, but seems to be explicitly not wanted by the original poster.

Using the Format property "properly" is the only way to make sure the data
are presented as required by the developer. Sometimes this is according to
the user preferences (so Med Time, General, etc. would be correct), and
sometimes it has to be completely explicit.

HTH


Tim F
 
L

Liz

Yup...
Thanks for the reply. Always new ways to look at things.
I hadn't thought about the Input Mask property being
inherently bad, but I can see your point.
Ta
 

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