Decimals In Access

G

Guest

I have set up a table in access, setting the data type to number, the field
size to decimal, the format to general number and the decimal places to auto
or "4". When I input the data in the table, the table automatically rounds
the number to the closest integer. How do I retain the numbers to the right
of the decimal point
 
D

Douglas J Steele

Check what the Field Size is set to (in the bottom left-hand corner when
your table is open in Design Mode).

By default, Numeric fields are set to Long Integer, which don't have decimal
points. To be able to store decimals, you need to use either Single or
Double.
 
G

Guest

..... and make sure that the field size is not Long Integer or Integer!
You'll need at least Single or better yet Double.
 
P

peregenem

Douglas said:
To be able to store decimals, you need to use either Single or
Double.

No, Single and Double are inexact data types for storing floating point
data, which is rarely encountered (in my experience). Far more common
is genuinely decimal data.

With effect from Access2000 and Jet 4.0, we now have has a DECIMAL data
type. It sound like this is exactly what the OP intended to use.

Note there is a further data type, CURRENCY, that supports a decimal
scale of four (fixed). However, CURRENCY has different rounding rules
to DECIMAL (bankers' vs truncation).
 

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