# Thread: Rounding Results of Calculation (97/SR-2)

1. ## Rounding Results of Calculation (97/SR-2)

How can I get Access to round the result of a calculation? I use a query to calculate a late payment fee as .000833 of an overdue balance. I need to have the result rounded to two decimal places -- not just displayed with two decimal places, but stored that way. Is there a function that does this? Is there ANYTHING that does this?

Thanks for helping!

2. ## Re: Rounding Results of Calculation (97/SR-2)

-------------------------------------------------
--- not just displayed with two decimal places, but stored that way. Is there a function that does this? Is there ANYTHING that does this?
----------------------------------------------
I think you will find the Currency data type will store the values correctly for you. You can set it in the design view of the table. Set the fields data type to

3. ## Re: Rounding Results of Calculation (97/SR-2)

I just had a thought, what do Microsoft use to do their accounts? The currency type in Access wouldn

4. ## Re: Rounding Results of Calculation (97/SR-2)

I use the following function to round to 2 decimal places.
<pre>public function gfRound2(input) as currency

gfRound2 = CCur(CCur(input)/100) * 100

end function</pre>

5. ## Re: Rounding Results of Calculation (97/SR-2)

I once heard of a presentation about a new Microsoft product performed by a Microsoft representative.
It was performed using a Macintosh linked to the o/head display and documentation was provided by Adobe!

6. ## Re: Rounding Results of Calculation (97/SR-2)

Setting the format to 2 decimal places doesn't have any effect on how it is stored - just how it is displayed.
I once fell into that trap some time ago and had problems such as:-
Why does 1.25 + 1.25 + 1.25 = 3.76!
Setting the display to more decimal places showed it was in fact 1.253 + 1.253 + 1.253

I would recommend NOT to use the formatting possibility in a table just to assist you, as developer/administrator, if you need to go into the tables to track a problem. You can always display it on form/report to 2 decimal places for the users.

7. ## Re: Rounding Results of Calculation (97/SR-2)

Well if I had unlimited resources I

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•