If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Currency Field
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 |
#2
|
|||
|
|||
Currency Field
hi Aurora,
On 09.03.2010 16:01, Aurora wrote: 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/libr...ice.10%29.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 -- |
#3
|
|||
|
|||
Currency Field
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 "Stefan Hoffmann" wrote: hi Aurora, On 09.03.2010 16:01, Aurora wrote: 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/libr...ice.10%29.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 -- . |
#4
|
|||
|
|||
Currency Field
On Tue, 9 Mar 2010 07:01:01 -0800, Aurora
wrote: 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. -- John W. Vinson [MVP] |
#5
|
|||
|
|||
Currency Field
On 09.03.2010 18:01, Aurora wrote:
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 -- |
#6
|
|||
|
|||
Currency Field
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 "John W. Vinson" wrote: On Tue, 9 Mar 2010 07:01:01 -0800, Aurora wrote: 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. -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|