Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I prevent a number from rounding in Access?

0 views
Skip to first unread message

KL2111

unread,
Nov 11, 2009, 12:02:16 AM11/11/09
to
If I enter a number with a decimal, Access rounds the number. For example 1.5
becomes 2, etc...

Tom van Stiphout

unread,
Nov 11, 2009, 12:06:39 AM11/11/09
to
On Tue, 10 Nov 2009 21:02:16 -0800, KL2111
<KL2...@discussions.microsoft.com> wrote:

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

-Tom.
Microsoft Access MVP

John W. Vinson

unread,
Nov 11, 2009, 12:03:54 PM11/11/09
to
On Tue, 10 Nov 2009 21:02:16 -0800, KL2111 <KL2...@discussions.microsoft.com>
wrote:

>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).
--

John W. Vinson [MVP]

0 new messages