Results 1 to 5 of 5
  1. #1
    xmattxman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2017
    Posts
    19

    Rounding a number in access

    I have a field that looks like this
    Total_Amnt: [SH_QTY]*[Price_Disc]

    An example of my outcome is 1074.528.


    I need that number to round to 1074.53. I am not sure how to go about doing that. Any help would be appreciated!

  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,652
    Check out the Round() function for starters.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Be aware Round() function in Access uses banker's (even/odd) rounding.

    Round(4.65,1) = 4.6

    Round(4.55,1) = 4.6
    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.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    I suggest using Decimal and specify scale and precision properties in the table.
    Precision is the total number of digits allowed in a number, including left and right of the decimal.
    Scale is the number of digits allowed to the right of the decimal.


    So 1234567.89 has a precision of 9.
    123456.789 has a precision of 9 and a scale of 3.


    A precision of 4 and scale of 2 would result in a number with a maximun value of 99.99


    Percent designations like 125.5% would require precision 4 and scale of 3 (not one) since it is actually stored as 1.255.


    Precision has a maximum value of 28, but textboxes in forms allow only a max of about 15 decimal places.

  5. #5
    xmattxman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2017
    Posts
    19
    Thanks for the help guys! I used the precision scale in the table properties and that fixed my issues!

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

Similar Threads

  1. Help with rounding in Access and Excel
    By nbrock2002 in forum Access
    Replies: 3
    Last Post: 07-23-2018, 03:35 PM
  2. Replies: 1
    Last Post: 06-07-2018, 08:05 AM
  3. Rounding off a number in a text box
    By angie in forum Forms
    Replies: 4
    Last Post: 03-13-2018, 05:19 PM
  4. Rounding a number in a query
    By libraccess in forum Queries
    Replies: 3
    Last Post: 08-25-2012, 09:13 AM
  5. Rounding number up to half hour
    By crxftw in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:29 AM

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