Results 1 to 4 of 4
  1. #1
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727

    Input Mask Question

    I want to set up an input mask for one of my field boxes on a form. I am making a movie database and would like to enter the length of the movie into a field. I would like it to look like this for example: 1hr 45mins if I type 145.



    Take it a step further and if I could just type in the amount of minutes the movie is and then it will break it down into hrs and mins for me that would be even better. For example: if I type in 90 it can break it down for me as 1hr 30mins.

    The second way would be super awesome but the first way is good enough too. Now that I think about it, it will probably take a macro or VBA to do this. Can anyone help with that?

    Any help is appreciated.

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Try:
    Int(minutes / 60) & "hrs " & minutes mod 60 & "mins"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727
    Is this an incomplete code? Do I put it in Form event? or on the field itself.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Can put that expression in a query to create a field or in textbox ControlSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. input mask
    By slimjen in forum Forms
    Replies: 7
    Last Post: 10-07-2013, 03:20 PM
  2. Input Mask Question
    By MM12 in forum Access
    Replies: 2
    Last Post: 09-10-2012, 11:03 AM
  3. Input Mask
    By qbc in forum Access
    Replies: 2
    Last Post: 01-20-2012, 03:27 PM
  4. Replies: 4
    Last Post: 10-31-2010, 10:35 AM
  5. Input mask
    By doobybug in forum Access
    Replies: 2
    Last Post: 06-17-2009, 09:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums