MS Access: Some Results = -1 or 1, when 0 is expected

Running a query in MS Access and a few of the SUM results that should = 0 are coming out -1 and 1. The data types in the table it references are Double with 6 Decimal places. When I take the same  numbers out of MS Access and add them in Excel the result is 0. Any suggestions would be great! Thanks!
clover10Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SharathData EngineerCommented:
Post your sample data and the query you tried.
0
clover10Author Commented:
SELECT DExtract.[Element], DExtract.AmountTBCACB AS COM, 
Sum(IIf(([DExtract].[ValTT]<>"Payments") And ([DExtract].[ValTT]<>"Invoices"),[DExtract].[AmountTBCAPB],0)) AS [UV], 
Sum(IIf([DExtract].[ValTT]="Payments",[DExtract].[AmountTBCAPB],0)) AS [Payments], 
Sum(IIf([DExtract].[ValTT]="Invoices",[DExtract].[AmountTBCAPB],0)) AS [INV], 
Sum(DExtract.AmountTBCAPB) AS [Total C], 
Sum(DExtract.AmountTBCAPB) AS [GO]
FROM DExtract
GROUP BY DExtract.[Element], DExtract.AmountTBCACB;

Open in new window

0
SharathData EngineerCommented:
Thanks for posting the query. It would be better if you post some sample data and the expected result.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

clover10Author Commented:
I am sorry, here is the data sample
DExtract-Sample1.xlsx
0
SharathData EngineerCommented:
And what is the expected result?
0
clover10Author Commented:
0
jerryb30Commented:
I am getting the same results that you are looking for if I read things rightly), except:
Where does TS:0002500000000036 come from?
0
clover10Author Commented:
That is the problem.. In excel I get the correct results but there is something off with Access because it gives me -1 and 1 for some of the values that should be 0. TS:0002500000000036 is in the DataSample tab along with the other elements.
0
SharathData EngineerCommented:
I think its better to attach your database here to understand the issue.
0
clover10Author Commented:
Changed data type to currency, resolved issue
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clover10Author Commented:
The error was due to the data type of the field that was being added.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.