1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access Input Mask for Time Field

Discussion in 'Business Applications' started by starshu, May 15, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. starshu

    starshu Thread Starter

    Joined:
    Jul 21, 2004
    Messages:
    10
    Running Access 2010. I am building a database that requires a time field and I would like to make it as simple as possible for the user to enter the time in standard 12 hour mode. For 6:00 am I would like the user to be able to enter 6a, for 12:35 pm I would like them to be able to enter 1235p, etc. No spaces or colons to enter. I cannot seem to devise a custom input mask to do this. I am not very proficient at VB but am willing to try with some clear direction. Any help will be greatly appreciated.
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You could use
    99:99
    but might have to use 99:99:99 as a short time format usually has seconds
    6:00 am would be 06 as Access assumes values less than 12 are am, likewise 12.35 is pm as 35 minutes past midnight is 00:35.
    So in the table and form set the
    Format to Short Time
    Input mask to 99:99
    and the
    Default Value to 00:00
     
  3. starshu

    starshu Thread Starter

    Joined:
    Jul 21, 2004
    Messages:
    10
    Thanks for the response OBP. The way you describe is the way I currently have it set up and it works well. My original post was an attempt to emulate an old and unsupported software package that I am trying to replace for a user so that we can upgrade her PC. She has no problem with this format but it is different than what she is used to and I was just trying to make a quick attempt to offer her the same capability as before. Only a matter of a few keystrokes difference per day. Thanks again.
     
  4. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    If you really want to make it idiot proof put in a dropdown list with all of the available times in the format you want.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1053346

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice