number automatically rounds up

G

Guest

I have a longinteger number field set to decimal. I would like to store
numbers like 178.3 or 165.7. but after moving to next field it automatically
rounds up to 178.0 or 166.0. How can I fix this issue?
 
J

John W. Vinson

I have a longinteger number field set to decimal. I would like to store
numbers like 178.3 or 165.7. but after moving to next field it automatically
rounds up to 178.0 or 166.0. How can I fix this issue?

By not using a longinteger field.

An Integer, by definition, is a whole number. Use a Single or Double float
number datatype, or a Decimal (not long integer) number type; or don't use a
Number field at all, use Currency instead (it allows exactly four decimals and
doesn't have the roundoff error problems that Single and Double do).

John W. Vinson [MVP]
 

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