Zero Isn't Zero

J

Jeff Boyce

I'm going to guess that you do NOT have currency fields (i.e., data type =
currency in the underlying table). Instead, I'm suspecting you have Single
or Double (or Decimal) data types defined.

The reason I suspect this is because currency data types allow ONLY 4
decimal places, and you indicated a value of ".00013" (too many decimal
places!).

It may be that you are FORMATTING fields or controls as Currency, but that
doesn't change the underlying datatype in the tables. How it gets displayed
(formatting) is not the same as how it is stored.

There's a potential error-in-calculation that occurs when you rely on Single
or Double data types. If you only need (no more than) 4 decimal places of
accuracy, change the data type in the table to Currency.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
F

fredg

I'm subtracting Currency fields and have a lot depending on the field
being Zero if it's suppose to be Zero. The problem is that even though
it says $0.00 it really is .00013 or something of the sort. How can I
make sure that the currancy fields don't have some numbers way out there
on the otherside of the decimal?
Thanks
DS

A Currency datatype field can only carry 4 decimal positions.

I think you are confusing the Format of a field (in Currency format)
with the datatype of a field (as Currency datatype).
The two are different.
I suspect the field is Number Datatype with a Field Size of Double.
It's Format is Currency.

Single and Double Field size numbers are approximate, and cannot
always be exact, i.e. similar to expressing the value of 1/3 as a
decimal. It's .33333...... while 1/2 is exactly .5.

Make the Field's Datatype Currency.
You can also Format it as Currency (or Not) as you wish.
 
D

DS

I'm subtracting Currency fields and have a lot depending on the field
being Zero if it's suppose to be Zero. The problem is that even though
it says $0.00 it really is .00013 or something of the sort. How can I
make sure that the currancy fields don't have some numbers way out there
on the otherside of the decimal?
Thanks
DS
 
D

DS

fredg said:
A Currency datatype field can only carry 4 decimal positions.

I think you are confusing the Format of a field (in Currency format)
with the datatype of a field (as Currency datatype).
The two are different.
I suspect the field is Number Datatype with a Field Size of Double.
It's Format is Currency.

Single and Double Field size numbers are approximate, and cannot
always be exact, i.e. similar to expressing the value of 1/3 as a
decimal. It's .33333...... while 1/2 is exactly .5.

Make the Field's Datatype Currency.
You can also Format it as Currency (or Not) as you wish.
thanks...i checked everything and all is currency (now). one of the
field are unbound so i also used the round() function on everything and
that seemed to cure all.
ds
 
D

DS

Jeff said:
I'm going to guess that you do NOT have currency fields (i.e., data type =
currency in the underlying table). Instead, I'm suspecting you have Single
or Double (or Decimal) data types defined.

The reason I suspect this is because currency data types allow ONLY 4
decimal places, and you indicated a value of ".00013" (too many decimal
places!).

It may be that you are FORMATTING fields or controls as Currency, but that
doesn't change the underlying datatype in the tables. How it gets displayed
(formatting) is not the same as how it is stored.

There's a potential error-in-calculation that occurs when you rely on Single
or Double data types. If you only need (no more than) 4 decimal places of
accuracy, change the data type in the table to Currency.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
I checked and corrected the fields...all is well.
thanks
ds
 

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

Top