Don't want my numbers to round

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?
 
N

Nikos Yannacopoulos

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
 
G

Guest

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?
 
G

Guest

Sorry. I should have typed

Deduction Total (FICA + Medicare) = $14.69 (here is my rounding problem)
Net = $177.31
 
N

Nikos Yannacopoulos

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
 
G

Guest

Nikos - You are a genius! Thank you, thank you, thank you!! That was
driving me crazy. You have kept me sane.
 
N

Nikos Yannacopoulos

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
 

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