Access-0.25 shows as zero in table-I want 0.25

B

B A Sullivan

How do I get my number fields to display values that are less than 1 as the
actual value; e.g., 0.25?

They currently display as zero.

Thanks very much,
 
R

Rick Brandt

B said:
How do I get my number fields to display values that are less than 1
as the actual value; e.g., 0.25?

They currently display as zero.

Thanks very much,

What Field Size did you specify? You cannot use Byte, Integer, or Long Integer
as by defeiniton, those do not support fractional values. You need to use
Single, Double, Decimal or use the DataType Currency.

Note that formatting is a completely separate issue and only affects display,
not storage.
 
J

John Vinson

On Sat, 7 Oct 2006 08:55:02 -0700, B A Sullivan <B A
How do I get my number fields to display values that are less than 1 as the
actual value; e.g., 0.25?

By default, a Number field is defined as a Long Integer. Integers are,
by definition, whole numbers, and cannot accept fractional values such
as 0.25 or 1.25.

Either change the properties of the field - in the lower left corner
of the table design screen when you select the field - from Long
Integer to Float or Double; or change the datatype of the field itself
from Number to Currency. Float and Double are accurate to about 7 or
14 decimal places' accuracy, but both have problems with "roundoff
error"; Currency handles exactly four, no more and no fewer, decimal
places with no roundoff problems.

Depending on your version of Access, you may also have a Decimal size
property. Be aware that this has some bugs: see

http://support.microsoft.com/kb/837148/en-us

John W. Vinson[MVP]
 
J

John Vinson

· the problem has been fixed in Access2007 engine;

which is still in beta (and should not be used for production use!)
and which many people do not have;
· SQL is a set-based language where order has no meaning; it only
affects the ORDER BY clause which uses a cursor.

but which can affect real-life operations in Access applications.

Maybe having wrong results generated from commercial applications
isn't significant to you, but some people might find it so.

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