Don't want my numbers to round

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am calculating FICA and Medicare and subtracting those from a gross amound.
I want my final number to show only two decimals, but during the calculation
I don't want Access to round my total. Is there a way to turn off the
rounding function and still display only two decimals in my form?
 
In your table design, select data type Double for the amount fields.
In your form/report design, set the Decimals property to 2 (and the Format
property to either Standard or Fixed) for the amount controls.
This will ensure that while all possible accuracy is stored / maintained in
the calculations, you only see two decimals.

HTH,
Nikos
 
I had my Decimals property set to 2, but I had my Format property set to
currency. I tried changing it to fixed, but I still have the same rounding
problem, and I lose my $. Here is an example:

Gross = $192.00
FICA (192 * 0.062) = $11.90
Medicare (192 * 0.0145) = $2.78
Deduction Total (FICA + Medicare) = $14.62 (here is my rounding problem)
Net = $177.32

I don't want Access to round when calculating the deduction total. It put's
me off one penny. Can you help me?
 
Sorry. I should have typed

Deduction Total (FICA + Medicare) = $14.69 (here is my rounding problem)
Net = $177.31
 
Got you. Your problem is 11.90 + 2.78 = 14.69 instead of 14.68, right?

Well, Access is doing the right thing here, which is calculating at the
highest possible accuracy. Your problem is how the info is displayed, not
stored or calculated. I do understand, though, that this can be quite
important in accounting, and my answer comes from my experience with SAP (a
well established ERP system): the answer is, simply, store and calculate
with just two decimals: sacrifice accuracy in the interest of accounting
presentation correctness. For instance:

FICA:
(192 * 0.062) = $11.904 displayed $11.90, *but*
Round(192 * 0.062, 2) = $11.90

Medicare:
(192 * 0.0145) = $2.784 displayed $2.78, *but*
Round(192 * 0.0145, 2) = $2.78

Deduction Total
(FICA + Medicare) = $11.904 + $2.784 = $14.688 displayed as $14.69, *but*
Round(192 * 0.062, 2) + Round(192 * 0.0145, 2) = $11.90 + $2.78 = $14.68

Does this do it?

Nikos
 
Nikos - You are a genius! Thank you, thank you, thank you!! That was
driving me crazy. You have kept me sane.
 
Well, thanks for your kind words, but genious has nothing to do with this...
experience does. When I first started digging into SAP I was surprized that
it limited all amount calculations to two decimals, and puzzled why it did.
Then I figured it out. Now you know too!

Nikos
 
Back
Top