Solved

Multiple criteria DSum issue

Posted on 2011-03-16
4
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35152356


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

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

623 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