Rounding Pennies

S

Sherrie

Is there a way to have access round to the exact dollar?
Example: I have values in a column $111.12
$139.39
with a calculation for the total sum in my footer
=Sum([QtrlyAdvisoryFee])
BUT, my ending result is $250.50 when it should be $250.51.

I don't want to always round up, because sometimes it is a
penny less. My values are formated in the table as
numbers with field size double and auto for decimal
places, then in my report I formated it as currency.

Please help with these pennies!!! Thank you!
 
A

Allen Browne

To solve the problem completely, you need to change your fields to type
Currency. Then ensure that exact pennies are stored by rounding any
calculation before storing.

The Currency is a fixed point data type. It always stores exactly 4 decimal
places. By rounding before storing, the last 2 digits are zeros (generally
not displayed). Neither the Single nor Double data type can give you that
precision.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top