About setting the number of decimal places to display in a field or control (MDB)

Microsoft Office Access 2003

Show All Show All

About setting the number of decimal places to display in a field or control (MDB)

Note  The information in this topic applies only to a Microsoft Access database (.mdb).

In a Microsoft Access database, you'll usually want to set the property for the field in table Design view. This way, the setting is automatically applied to the field in query Design view and to controls on a form or report bound to that field. In certain cases, however, you may want to set the property in query Design view, form Design view, or report Design view. For example, you may want to display a different number of decimal places in a table datasheet than in a report. You could set the DecimalPlaces property for the field in query Design view and then base your report on the query. If you're using an unbound control, you'll need to set the DecimalPlaces property in form Design view or report Design view.

The DecimalPlaces property setting affects only the number of decimal places that are displayed, not how many decimal places are stored. For example, a field whose FieldSize property is set to Single can store numbers with seven digits to the right of the decimal point. However, if the field's Format property is set to Fixed and the DecimalPlaces property is set to 3, you see only three digits to the right of the decimal point when you view the data. For instance, the stored value of 15.5555 is displayed as 15.556.