How do I set up a field to be a number and include 2 dec places

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database already established. There are a few quantity fields in
the table, and they currently are Long Integers. There are no decimal
places. I can type in a decimal, ex. 4.25, but access converts it to 4.
What do I need to do in the properties to change that field so that the
decimals are displayed?
 
An integer, by definition, does not include decimals. An integer is a whole
number.

Change the field.
 
I have a database already established. There are a few quantity fields in
the table, and they currently are Long Integers. There are no decimal
places. I can type in a decimal, ex. 4.25, but access converts it to 4.
What do I need to do in the properties to change that field so that the
decimals are displayed?

An Integer is - by definition - a whole number. A Long Integer
datatype does not support decimal places and cannot be made to do so.

You must either change the datatype to a Number datatype which does
(Float or Double); but both these datatypes have "roundoff error" and
may not be ideal. A Currency datatype has exactly four decimals and no
roundoff error.

John W. Vinson[MVP]
 
I have a database already established. There are a few quantity fields in
the table, and they currently are Long Integers. There are no decimal
places. I can type in a decimal, ex. 4.25, but access converts it to 4.
What do I need to do in the properties to change that field so that the
decimals are displayed?

You can change the data type of the column to Currency in the table's design
view.

You could use Single or Double as well, but those data types have very
unreliable precision because they are internally stored as floating point
values. Currency is internally stored as a scaled integer, and is also
faster than Single and Double.

--
Peace & happy computing,

Mike Labosh, MCSD
"Working here is like living inside a Salvador Dali painting." -- Me. Yeah,
ME! [Oh fer cryin out loud]
 
Back
Top