Problems calculating with currency!

odin1701

Registered User.
Local time
Today, 13:02
Joined
Dec 6, 2006
Messages
526
Okay so I have a form that is causing problems somehow.

I have a data table that has currency values in it. There is a field on the form that adds and subtracts some of what is entered in order to determine if an account can be archived.

Basically it's for following up on some collections. You can enter payments and invoices and such - and if the numbers all total out to $0, then the account can be archived.

My problem is that the numbers do total to $0, and that is what the field says. However when I click in the field, it gives me like 2.8.....E10 or some ridiculously small amount. So it won't allow archive even though it IS a $0 amount.

How can I fix this? The data in the table is set to Double (otherwise the cents get rounded off the data), the format is set to currency and the decimal places is set to 2. Just simple addition and subtraction is all that's being done on these numbers so I don't get it.

I could force the amount to a different data type in that calculation, but again it would drop the cents, so if $0.20 was left it would treat it as 0 and allow an archive when it shouldn't.

Help!
 
What about the format on the form? Is currency with 2 digit decimal as well?
 
You should be using Currency data type, not Double data type and the formatting won't be needed. Change your field to Currency data type in table design view.
 
lol....I'm a moron.

Of course. I totally spaced on that.
 
Don't worry. I've made some big 'Doh' moment myself... :)
 

Users who are viewing this thread

Back
Top Bottom