Stop reports from rounding down (1 Viewer)

Rushman21

Registered User.
Local time
Today, 08:09
Joined
Nov 2, 2011
Messages
23
Howdy all. Been a while since I have been on. I built a basic database that totals hourly rates to hours worked. Work fine except when I run a report from a query, some totals will round down. In the example in the document attached, you see that project 1801 total rounds down and the 1615 is fine. I'm thinking because of the 4.75 and 3.25 hours may be doing this? The document shows how my Query and Report formulas. Please let let me know if you need more information. The totals are never in a table. I just query the totals for them to print out. I have tried changing the report Format from Currency to fixed numbers and other options. Also have changed the Decimal Places to many different numbers but still off by a penny or two. Thank you for your time.
 

Attachments

  • Access Database.zip
    128.4 KB · Views: 70

CJ_London

Super Moderator
Staff member
Local time
Today, 16:09
Joined
Feb 19, 2013
Messages
16,614
it will be because you are only displaying 2 numbers after the dp and the actual value goes to more numbers.

for example 104.27 * 0.5=52.135, not 52.14

to solve this use the round function to 2 dp in your calculation

round(104.27 * 0.5,2)

also be aware of bankers rounding which will round .5 up or down depending on the last but on digit
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:09
Joined
May 7, 2009
Messages
19,245
you can also create a small function (see fnDecimalPlace() in module1) that will show you
2 decimal places without rounding Up or Down.
then call it in your query (see query1).
view your report (query1).
 

Attachments

  • rounding_problem.accdb
    640 KB · Views: 79

Rushman21

Registered User.
Local time
Today, 08:09
Joined
Nov 2, 2011
Messages
23
you can also create a small function (see fnDecimalPlace() in module1) that will show you
2 decimal places without rounding Up or Down.
then call it in your query (see query1).
view your report (query1).
Thank you! this seemed to do the trick. Thank you very much!
 

Users who are viewing this thread

Top Bottom