>I guess with the calculations, I can code to make sure only 2 decimal places
>are returned, but is there a way to stop the entry of 3 decimal places in a
>currency field? I would have thought that by limiting the property of the
>field to 2 decimal places then only 2 places could be entered. Wrong!
Wrong indeed. A Currency datatype field always has four, and exactly four,
decimal places.
You need to Round or truncate the calculations to two decimals at the time the
calculation is done.
John W. Vinson [MVP]
John Baker - 30 May 2007 04:03 GMT
Thanks John.
You have just given me the go ahead to do what I was trying to avoid doing
but what I really need to do.
Cheers
John B.
>>I guess with the calculations, I can code to make sure only 2 decimal
>>places
[quoted text clipped - 11 lines]
>
> John W. Vinson [MVP]
John W. Vinson - 30 May 2007 05:24 GMT
>Thanks John.
>
>You have just given me the go ahead to do what I was trying to avoid doing
>but what I really need to do.
Just note that the Decimal Places property of a currency (or Number, for that
matter) field only affects the appearance - what's shown, rather than what's
stored.
You can also use a Number... Decimal type and explicitly set the size of the
Decimal number to use two decimals, if you have A2003 or later.
John W. Vinson [MVP]