How do I prevent a number from rounding in Access?

K

KL2111

If I enter a number with a decimal, Access rounds the number. For example 1.5
becomes 2, etc...
 
T

Tom van Stiphout

On Tue, 10 Nov 2009 21:02:16 -0800, KL2111

Perhaps you have the control bound to an Integer field. Use Double or
Single instead.

-Tom.
Microsoft Access MVP
 
J

John W. Vinson

If I enter a number with a decimal, Access rounds the number. For example 1.5
becomes 2, etc...

The default Number datatype is "Long Integer". An Integer is, by definition, a
whole number, and Access will round it.

If you want to store a number with decimals, use either Number... Single
(floating point, up to seven digits precision, possible roundoff error
problems), Number... Double (floating point, up to fourteen digits, same
problem), or Number... Decimal (you set the precision and number of decimals);
or use a Currency datatype (exactly four decimals, no roundoff error).
 

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