Share via

Access SUM function not calculating correctly

Anonymous
2016-12-22T21:42:07+00:00

Working with the SQL query interface in Access and the SUM function is not calculating correctly. The table I am working with has an AMT column with values in it that are limited to no more than 2 decimal places. Data was imported to this table from Excel, where the total of the column was confirmed to be 4,845,474.96, however when using SUM(AMT) the result returned is 4,845,474.96000043. Very nearly right, and yet impossibly wrong. Had a similar SUM function go wrong where .00000001 or so was lost when doing a sum. The raw data contains absolutely no data beyond the second decimal, so having anything beyond that is impossible, yet somehow Access is creating this extra data. Where did these extra decimal places come from?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2016-12-22T22:01:49+00:00

                     Where did these extra decimal places come from?

Access uses binary when doing math and all other kinds of numbers except Integer can give such errors.

I would suggest you use a Currency datatype.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2016-12-23T14:54:16+00:00

    That makes sense, and it solves my problem. Also makes the formatting easier as this is currency data anyway, so thanks!

    Was this answer helpful?

    0 comments No comments