Rounding in a Currency Field

S

S4Aero

thanks to everyone who helped with my table relationships issue - that
problem is solved. Now a strange thing - I have multiple currency fields
that work correctly with formating and decimal placement - (I enter "35.50"
and the field shows $35.50). Perfect. However, I have other fields where I
enter the same numeric string and the result rounds to an even number -
("35.50" becomes $35.00). Decimal place is set to auto - even if I change it
to "2", the result is the same. I have examined the properties, but can't see
a difference.

Weird...

Thanks in advance.

ernie
 
S

S4Aero

That issue solved - was actually a "number field" - fixed - however - my
number fields are doing the same thing - i looked at formating, but haven't
figured it out yet. there will be occasions where I will need to enter "1.5"
and it can't be rounded. (feeling a bit ignorant...)
 
S

S4Aero

That problem solved - was actually a "number" field. However, my number
(quantitiy) fields are doing the same thing. Most of the time I will be
entering a whole number, but there will be times when a decimal will need to
be entered ("1.5" for example). The various formatting looks to be ok.
(feeling a bit ignorant),,,

Ernie
 
J

John W. Vinson

thanks to everyone who helped with my table relationships issue - that
problem is solved. Now a strange thing - I have multiple currency fields
that work correctly with formating and decimal placement - (I enter "35.50"
and the field shows $35.50). Perfect. However, I have other fields where I
enter the same numeric string and the result rounds to an even number -
("35.50" becomes $35.00). Decimal place is set to auto - even if I change it
to "2", the result is the same. I have examined the properties, but can't see
a difference.

Weird...

Thanks in advance.

ernie

Doublecheck the *datatype* of the field in the Table (not the form)
definition; these are probably Number... Long Integer fields. They'll show
Number in the second column of the table design display, and Long Integer in
the Size field of the field properties.

It can be confusing: you can apply a Currency *format* to a Number field, but
that merely controls how it's displayed (with a leading currency symbol and
commas, usually), not how it's stored. The Currency *datatype* is a huge
scaled integer with four decimal places and almost enough digits to display
the United States budget deficit.
 
J

John W. Vinson

That problem solved - was actually a "number" field. However, my number
(quantitiy) fields are doing the same thing. Most of the time I will be
entering a whole number, but there will be times when a decimal will need to
be entered ("1.5" for example). The various formatting looks to be ok.
(feeling a bit ignorant),,,

The default Number datatype is Long Integer, and an Integer is by definition a
whole number. You can use a Decimal style number (and set the number of
decimal places as you please), or a Currency datatype (just without a currency
format) if four decimal places will do; or a Single or Double number type,
which will give you a floating-point number with about seven or fourteen
digits of precision respectively.
 

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

Similar Threads


Top