Results 1 to 4 of 4
  1. #1
    aquabp is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    69

    How do you round a calculated field value?

    I have an invoice total column that is based on a calculated field. On the invoice I can format it to currency with 2 decimal places and all is good. When I receive payment I want to compare what came in with that calculated invoice field.

    I have set the format to integer on the query but when I compare that value with the amount that was paid the comparison always uses the calculated number. The result kicks out on the payment issue report.

    Any help or ideas would be greatly appreciated!

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Why are you using Integer? An integer is a whole number that does not allow for decimals.
    So a field formatted as currency, which allows for decimals, will not match up very well with a field formatted as integer.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    cant you just use FORMAT, since it shows the real number (but only shows 2 digits)?
    otherwise you can use,ROUND([field1]/[field2], 2) but that will produce rounding error.
    tho,
    whichever way your company wants to use.

    I suggest, NOT calculating the final number but rather calculate it into a field, AND keep the original. My boss wanted both the long# and the calculated to show what data go lost and rounding error.

  4. #4
    aquabp is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    69
    Great! Thanks! Yes I have been trying to use format but the properties box on a query does not have a setting for a decimal which I found weird. I can dump it into a table and get the results but trying to avoid creating another table. Thanks again!

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

Similar Threads

  1. Replies: 2
    Last Post: 12-30-2014, 01:32 PM
  2. Replies: 2
    Last Post: 12-15-2013, 02:29 AM
  3. Replies: 1
    Last Post: 04-21-2013, 03:20 PM
  4. Replies: 3
    Last Post: 02-13-2013, 10:15 AM
  5. Replies: 1
    Last Post: 06-09-2006, 05:44 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