Currency Datatype Really Good to Use For Non-currency Fields?

T

tbl

In the help files for MS Access 2000, there is the following
"tip":

Tip Use the Currency data type for a field requiring many
calculations involving data with one to four decimal places.
Single and Double data type fields require floating-point
calculation. The Currency data type uses a faster
fixed-point calculation.

Where I'm anticipating field values like "6.5", are there
any hidden drawbacks to using the currency datatype?
 
A

Allen Browne

Currency has the advantage that it is a fixed point number (exactly 4
decimal places.) That means it has none of the rounding issues inherent in
floating point types (Single and Double.) It is therfore ideal for number
that must include a fractional part, but where you don't want rounding or
matching errors.

For example, you could use it to store distances in metres, provided you
don't need anything smaller than one tenth of a metre.

Disadvantages:
a. Cannot handle minute or enormous values the way floating point fields
can.
b. According to the documentation, it may be slower to calculate, though I
have not observed this.
c. You need to specify the Format, so it does not display as currency.

Access 2000 introduced the Decimal type: a scalar number where you can
specify the number of decimal places. Unfortunately, it is not correctly
implemented, so even a basic sort fails, so I suggest you don't use this
type. Details:
http://allenbrowne.com/bug-08.html
 
T

tbl

Currency has the advantage that it is a fixed point number (exactly 4
decimal places.) That means it has none of the rounding issues inherent in
floating point types (Single and Double.) It is therfore ideal for number
that must include a fractional part, but where you don't want rounding or
matching errors.

For example, you could use it to store distances in metres, provided you
don't need anything smaller than one tenth of a metre.

Disadvantages:
a. Cannot handle minute or enormous values the way floating point fields
can.
b. According to the documentation, it may be slower to calculate, though I
have not observed this.
c. You need to specify the Format, so it does not display as currency.

Access 2000 introduced the Decimal type: a scalar number where you can
specify the number of decimal places. Unfortunately, it is not correctly
implemented, so even a basic sort fails, so I suggest you don't use this
type. Details:
http://allenbrowne.com/bug-08.html


Thanks Allen. Your information gives my confidence a boost.
It seems that the currency datatype should do just fine for
some of my fields.
 

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