ACC97: Excel ISAM Rounding Errors (162821)
The information in this article applies to:
This article was previously published under Q162821 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you export data to Microsoft Excel for Windows 95 or Microsoft Excel
97, numeric values are displayed in a more precise way than they were in
Microsoft Access, making the values appear to be incorrect. For example a
.15 in Microsoft Access appears as .15000000596 when exported to a
Microsoft Excel spreadsheet.
CAUSE
Microsoft Excel supports a different level of precision than does Microsoft
Access. This difference in rounding behavior occurs because of floating
point conversion.
RESOLUTION
The following are some methods to work around the different level of
precision. These are not meant to be all-inclusive.
- In an unbound text box on a form or report, you can set the Format
property to "0.0".
- In other controls, you can use a combination of the Format() and Val()
functions to convert the calculated value to the same precision as the
displayed value.
- You can change the formatting of the cells in the Microsoft Excel
spreadsheet.
Modification Type: | Major | Last Reviewed: | 9/25/2003 |
---|
Keywords: | kbinterop kbprb KB162821 |
---|
|