Calculation field rounds result down!

  • Thread starter Thread starter Devin
  • Start date Start date
D

Devin

Access 2003 (WinXP)

I have a simple calculation field on a form that is
adding the sum of a series of totals displayed on a
subform. (The totals are calculated via a query.)

=sum([FieldName])

The problem is that the calculation field is rounding the
numbers down. So that 2.00 + 2.00 + .50 = 4.00 rather
than 4.50

The field is set to 'Standard number' data type
displaying 2 decimals to the right of the decimal point.

Any suggestions?

Thanks!
-devin
 
Access 2003 (WinXP)

I have a simple calculation field on a form that is
adding the sum of a series of totals displayed on a
subform. (The totals are calculated via a query.)

=sum([FieldName])

The problem is that the calculation field is rounding the
numbers down. So that 2.00 + 2.00 + .50 = 4.00 rather
than 4.50

The field is set to 'Standard number' data type
displaying 2 decimals to the right of the decimal point.

The default Number type is a Long Integer. Integers, by definition,
are whole numbers.

Use either Float, Double, or (probably better) don't use a Number
datatype at all - use a Currency field. This field type has four
decimal places and (unlike Float or Double) it does not suffer
roundoff error.
 
Back
Top