sum is zero

S

sverre

Hi

I have found something I find strange in Access 2002. If I use the function
"sum" in a query then Access shows balances in the output (in my sample it
was a balance on the ninth decimal) even if the data Access has made the sum
on is zero!

I did the same sum in a pivot-table report in Excel and the pivot-table also
showed a small balance.

Could someone explains how Access sums data and secondly can I "get rid" of
the small balances by change a property in access? The small balances create
problems as I have matched two tables and the second table returns data twice
on the joined field.

Hope I explained my problem clearly!

Best regards
Sverker
 
J

Jeff Boyce

If the data type of the field you are summing is Single or Double, Access
(and any other program) will probably do the same. These data types are
stored as binary values, and can have such discrepancies due to rounding
errors.

If the data you need to keep doesn't need to have more than four decimal
places, use the Currency data type, which is stored exactly as show. This
data type won't have the kind of rounding errors I believe you are
describing.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 

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

Similar Threads

weighted average yield 1
general advice 3
combining queries into 1 8
calculating on 2 terms 1
3 queries into 1 8
First row where a cell is zero 1
AT WITS END ON QUERY TOTAL 34
CONCATENATE zeros 5

Top