Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2007

Tip: Looking for answers? Try searching our database.

Input masks and time values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Burke in Novi - 21 Jan 2007 16:11 GMT
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
John Nurick - 21 Jan 2007 18:54 GMT
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.

>I have a couple of questions.
>
[quoted text clipped - 11 lines]
>
>Jim B

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.