Solved

Multiple criteria DSum issue

Posted on 2011-03-16
4
328 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

751 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