Currency Field

  • Thread starter Thread starter Aurora
  • Start date Start date
A

Aurora

I am using Access 2003.
I have a form with a currency field that has 5 decimal points. This field
rounds up when I do not want it to. Ex: I put in $0.15768 and get $0.15770.
I trield to expand the field to 6 decimal points but it still rounded up.
How do I get this field to accept just the currency I put it and not round
up? I would appreciate any help you can give me.

Aurora
 
hi Aurora,

I have a form with a currency field that has 5 decimal points. This field
rounds up when I do not want it to. Ex: I put in $0.15768 and get $0.15770.
I trield to expand the field to 6 decimal points but it still rounded up.
How do I get this field to accept just the currency I put it and not round
up? I would appreciate any help you can give me.
It's not possible as it has only 4 digits to the right:

http://msdn.microsoft.com/en-us/library/aa210393(office.10).aspx

So you need either a Single or a Double field instead, but this depends
on your actual case (rounding is an issue here).


mfG
--> stefan <--
 
Thank you for responding. I am not sure what you mean when you said - "So
you need either a Single or a Double field instead, but this depends > on
your actual case (rounding is an issue here)."

I understand that "rounding" is the issue. Is there anywhere to put in a
formula that states "do not round up"??

Aurora
 
I am using Access 2003.
I have a form with a currency field that has 5 decimal points. This field
rounds up when I do not want it to. Ex: I put in $0.15768 and get $0.15770.
I trield to expand the field to 6 decimal points but it still rounded up.
How do I get this field to accept just the currency I put it and not round
up? I would appreciate any help you can give me.

Aurora

The Currency datatype in Access is a scaled large integer, with exactly four
decimal places. If you use a Currency field, that's part of the cost: you only
get four, and you *cannot* tweak it, or reformat it, or display it to hold
more.

You may want to consider using a different datatype. I'd suggest a Number,
with a Field Size property of Decimal, a Precision large enough to handle the
largest value you'll encounter, and a Scale of 5 to store five decimals.
 
Thank you for responding. I am not sure what you mean when you said - "So
you need either a Single or a Double field instead, but this depends> on
your actual case (rounding is an issue here)."

I understand that "rounding" is the issue. Is there anywhere to put in a
formula that states "do not round up"??
No. The problem is that Currency is an exact data type. It guarantees
accurate results in its 4-digit range. Using a Single or Double is
different. These are imprecise data types. Here you get rounding errors
due to the fact that computers cannot precisely calculate with these
kind of numbers.

When I say, it depends on the case, then I mean: What kind of values do
we have here? To which domain (range of values) do they belong? What
kind of arithmetic operations do we have to apply?


mfG
--> stefan <--
 
John:
Thank you so much for responding. I did what you said and it worked great.
Thank you for sharing your expertise. I really appreciate it.

Aurora
 
Back
Top