Money Problems

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have 2 Currency fields.
The second one subtracts from the first, then I have a running sum at
the bottom. The problem is that the answer is wrong. Whenever I
subtract say...

2.17 minus 2.17 I get answer of 2.16 a difference of a penney.

Why is this happening and how do I fix it?
Thanks
DS
 
If you get an answer of 2.16 for 2.17 minus 2.17, you got a VERY BIG
problem! Also, if you think the difference is a penney, you have a BIG
PROBLEM with your math skills!
 
PC said:
If you get an answer of 2.16 for 2.17 minus 2.17, you got a VERY BIG
problem! Also, if you think the difference is a penney, you have a BIG
PROBLEM with your math skills!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Ok...So how do I fix this problem?
Thanks
DS
 
Where does this subtraction take place, in a text box, query, VBA, or what?
A running sum at the bottom of what? Are you dealing with a report, a form,
a query?
 
What was the point of that "reply"? Regarding math skills, the difference
between 2.16 and 2.17, assuming U.S. currency, is .01, aka a penny.
 
I have 2 Currency fields.
The second one subtracts from the first, then I have a running sum at
the bottom. The problem is that the answer is wrong. Whenever I
subtract say...

2.17 minus 2.17 I get answer of 2.16 a difference of a penney.

My guess would be that the Currency field contains (unseen) values in
the third or fourth decimal place. A Currency datatype always has four
decimals - that is, 2.17 may actually be stored as 2.1654 in one
record, and as 2.1740 in another; the value is rounded to two decimals
for display.

When you subtract these you'll get 0.0088 which rounds to a penny.

Try changing the Decimal places property of the field in your table
datasheet and see if the numbers are as I suggest.

How are the values being entered? from a calculation? If so, you
should round the calculation expression to two decimals.

John W. Vinson[MVP]
 
Where is your sense of humor ???

<<2.17 minus 2.17 I get answer of 2.16 a difference of a penney.>>
2.17 minus 2.17 = 0
The difference between 0 and 2.16 is not a penny!!!!

Maybe you need help with your Reading skills!!!
 
John said:
My guess would be that the Currency field contains (unseen) values in
the third or fourth decimal place. A Currency datatype always has four
decimals - that is, 2.17 may actually be stored as 2.1654 in one
record, and as 2.1740 in another; the value is rounded to two decimals
for display.

When you subtract these you'll get 0.0088 which rounds to a penny.

Try changing the Decimal places property of the field in your table
datasheet and see if the numbers are as I suggest.

How are the values being entered? from a calculation? If so, you
should round the calculation expression to two decimals.

John W. Vinson[MVP]
Thanks John,
The problem was from another form where I was pulling the Sales Tax
from....here i NYC the Sales Tax is .0825 So I ended using this on that
field and all worked out fine.

Function Dollars(Amount)
Dollars = Int(Amount * 100 + 0.5) / 100
End Function

Thank You, once again.
DS
 
BruceM said:
What was the point of that "reply"? Regarding math skills, the difference
between 2.16 and 2.17, assuming U.S. currency, is .01, aka a penny.

:

Bruce...
The problem was from another form where I was pulling the Sales Tax from....
here in NYC the Sales Tax is .0825 So I ended using this on that field
and all worked out fine.

Function Dollars(Amount)
Dollars = Int(Amount * 100 + 0.5) / 100
End Function

Thanks for your help.
DS
 
I think we can all agree that the difference between 0 and 2.16 is not a
penny, and that the difference between 2.16 and 2.17 is, and that it all
depends on how you read it. I'm sure the person who posted was aware of the
mathematics involved. My point was that you offered nothing toward solving
the problem.
 
Back
Top