Solved

Multiple criteria DSum issue

Posted on 2011-03-16
4
324 Views
Last Modified: 2013-11-05
Can someone tell me what's wrong with this code?

Me.txtTotThisDayThisCat = (Me.txtQty + Nz(DSum("Qty", "tblProjectDetail", "[CapCat] = " & Chr(34) & Me.txtCapCat & Chr(34)), 0) And "[DropDueDate] = #Me.txtdropduedate#")
0
Comment
Question by:SteveL13
  • 3
4 Comments
 
LVL 75
ID: 35152339
Try this:

 Me.txtTotThisDayThisCat = (Me.txtQty + Nz(DSum("Qty", "tblProjectDetail", "[CapCat] = " & Chr(34) & Me.txtCapCat & Chr(34)), 0) & " And [DropDueDate] = #" & Me.txtdropduedate & "#")


mx
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35152356


Me.txtTotThisDayThisCat = (Me.txtQty + Nz(DSum("Qty", "tblProjectDetail", "[CapCat] = " & Chr(34) & Me.txtCapCat & Chr(34) & " And [DropDueDate] = #Me.txtdropduedate#" ), 0))
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35152358
oops


Me.txtTotThisDayThisCat = (Me.txtQty + Nz(DSum("Qty", "tblProjectDetail", "[CapCat] = " & Chr(34) & Me.txtCapCat & Chr(34) & " And [DropDueDate] = #" & Me.txtdropduedate &"#" ), 0))
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 35152363
this will also work




Me.txtTotThisDayThisCat = (Me.txtQty + Nz(DSum("Qty", "tblProjectDetail", "[CapCat] = '"  & Me.txtCapCat &  "' And [DropDueDate] = #" & Me.txtdropduedate &"#" ), 0))
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now