Results 1 to 4 of 4
  1. #1
    merebag is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    19

    Check for specific pattern right of decimal point

    I need a way to verify and trap for any value that is not in a quarter hour increment for an hours field. In other words, when a user enters in some hours for a billing program, I want only whole hours plus any quarter hour increments only. Example: (1.25 is good, 1.30 is not good) (23.75 is good, 23.80 is not good). Any good logic to trap for that in either using access commands or vba commands?



    Thanks

    Jeff

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Check out the Mod operator. I don't think it will use the fractions, so multiply by 100 and use 25 instead of .25.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    merebag is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    19
    That's a good approach. I will try that. Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No problem, post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Leading Zero and Decimal Point
    By didiomm in forum Programming
    Replies: 13
    Last Post: 09-07-2016, 01:46 PM
  2. Too many digits after decimal point!
    By euphonium01 in forum Queries
    Replies: 3
    Last Post: 02-18-2016, 05:54 AM
  3. Replies: 2
    Last Post: 11-16-2015, 08:13 AM
  4. Delete Zero after decimal point!
    By cuongmyh in forum Forms
    Replies: 1
    Last Post: 02-26-2015, 07:06 AM
  5. Convert decimal comma to decimal point
    By Hans Karlsson in forum Programming
    Replies: 3
    Last Post: 06-30-2014, 01:56 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