Dsum Statement

Hello :)

I'm having some difficulties in doing this statement .

Can anyone help me out? It's the first time I'm using access .

= DSum("[Quantity]", "[ MSP]", "[ ProductCode] LIKE 'EVWP*' AND "[Excluded]"=”FALSE”)

samuel maiaSage Co-ordinatorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

John TsioumprisSoftware & Systems EngineerCommented:
= DSum("[Quantity]", "[ MSP]", "[ ProductCode] LIKE 'EVWP*' AND [Excluded]=FALSE")

Open in new window


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
samuel maiaSage Co-ordinatorAuthor Commented:
Hi John :) Thanks very much for your help. Has a told before it's the first time I'm using Access, so I don't know if I'm doing things properly.
Hi John :) Thanks very much for your help. Has a told before it's the first time I'm using Access, so I don't know if I'm doing things properly? My aim is to put on the top of the report the sum of all the product codes that start with EVWP and are not excluded.

Am I doing something wrong?

Once again, thanks very much :D
John TsioumprisSoftware & Systems EngineerCommented:
The fixed Dsum should work...just test it on some sample data...either you have an error in your data or something else...if you can upload a sample it would be most helpful
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Your table name is MPS, but it's MSP in the statement.

 And please select John's last comment as answer.  I'm just adding on.

samuel maiaSage Co-ordinatorAuthor Commented:
I noted that mistake and I amended it. However, it didn't work. But I'm quite sure that's something I did wrong. I'll endeavor to find out whats wrong.

Thanks very much for your help guys.

samuel maiaSage Co-ordinatorAuthor Commented:
Statement and Data
Hello again :)

I've been trying to figure out what I've done wrong. However, I'm having some difficulties.
Here it's a part of my data set and both argument for the functions.

For instance, in the Dcount, everything it's easy peasy. But when getting down to the nitty-gritty, the Dsum, something goes wrong.
In my data set, in the exclusion column, I've tried both "False" and "No", but didn't work.

Any idea about whats wrong?

John TsioumprisSoftware & Systems EngineerCommented:
Looks good...i think something must be wrong with your data...maybe a null quantity or something else...go Query Designer and run a SUM with your criteria to see if you get some more info...and also..something i spot... Running Sum -->No
samuel maiaSage Co-ordinatorAuthor Commented:
I think its something about the way I was writing the argument. Because now I did the way you can see in the picture and its working (but just for one criteria :(   )
John TsioumprisSoftware & Systems EngineerCommented:
Exchange the criteria..to see if the other criteria is causing the issue...
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
Microsoft Access

From novice to tech pro — start learning today.