Input masks and time values

J

Jim Burke in Novi

I have a couple of questions.

First, with a time value is there any way via an input mask to have AM and
PM options available to the user. e.g. have it default to AM and allow them
to somehow toggle from AM to PM? Right now my only options are to force the
user to type AM or PM, or force them to use military time, or have a separate
control that toggles between AM/PM. Sure would be nice to do that with just
one text field.

Second, is there any way to override the default access message that comes
up when the user enters an invalid value where an input mask is used?

Any help is appreciated. Thanks,

Jim B
 
J

John Nurick

Hi Jim,

I don't think you can do it with an input mask. It might be possible to
approach this by experimenting with a control (not sure whether a
button, togglebutton or pair of option buttons) that ran code as
follows:

get the TimeValue() of whatever the users have entered
if it's < 0.5, it's AM, so add 0.5 to get PM
if it's >= 0.5 it's PM, so subtract 0.5 to get AM
set the textbox to the new value.
 

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