number data rounding up

  • Thread starter Thread starter Danny J
  • Start date Start date
D

Danny J

Dear All,

An embarrassingly simple problem...I have a number field numbers set as
number data type with 2 decimal places....yet the data is always rounded up
4.80 becomes 5. Why?

Many thanks,

Danny
 
Danny J said:
Dear All,

An embarrassingly simple problem...I have a number field numbers set as
number data type with 2 decimal places....yet the data is always rounded up
4.80 becomes 5. Why?

Among many stupid decisions by the Access designers was one to make the
DataType "Number" and then to define Integer, Long Integer, Single, and
Double as "Sizes" of a number. Every other database I have worked with
correctly defines all of these as individual DataTypes.

You most likely have your "size" defined as Integer or Long Integer neither
of which support fractional values. You need to use Single, Double, or
change the DataType to Currency if you want fractional values.
 
Dear All,

An embarrassingly simple problem...I have a number field numbers set as
number data type with 2 decimal places....yet the data is always rounded up
4.80 becomes 5. Why?

Many thanks,

Danny

Probably because you set the Field's Field Size property to Integer or
Long Integer.
By definition, an Integer is a whole number (so not decimal value is
allowed).
Change the Field's Field Size property to Double or Single, or change
the Field's Datatype to Currency.
 
Thanks!


fredg said:
Probably because you set the Field's Field Size property to Integer or
Long Integer.
By definition, an Integer is a whole number (so not decimal value is
allowed).
Change the Field's Field Size property to Double or Single, or change
the Field's Datatype to Currency.
 

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

Back
Top