Very complicated DSum syntax

This is what I have so far...
=Nz(DSum("Qty","tblPrintOrdTranxDetail","PartN = " & Chr(34) & [txtPartN] & Chr(34) & " AND [toWH] = " & Chr(34) & "AM" & Chr(34)),0)

but I have to add this to it...
and tblPrintOrdTranxDetail.PrintOrdDetailComplete = False

What would the code be?

--Steve
SteveL13Asked:
Who is Participating?
 
Dale FyeConnect With a Mentor Commented:
Try:


=Nz(DSum("Qty","tblPrintOrdTranxDetail","PartN = " & Chr(34) & [txtPartN] & Chr(34) & " AND [toWH] = " & Chr(34) & "AM" & Chr(34) & " AND [PrintOrdDetailComplete] = 0"),0)
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Try this:

Nz(DSum("Qty", "tblPrintOrdTranxDetail", "PartN = " & Chr(34) & [txtPartN] & Chr(34) & " AND [toWH] = " & Chr(34) & "AM" & Chr(34) & " AND tblPrintOrdTranxDetail.PrintOrdDetailComplete = " & False), 0)

mx
0
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:


=Nz(DSum("Qty","tblPrintOrdTranxDetail","PartN = " & Chr(34) & [txtPartN] & Chr(34) & " AND [toWH] = " & Chr(34) & "AM" & Chr(34) And PrintOrdDetailComplete =0" ),0)
0
 
Gustav BrockCIOCommented:
Or:

=Nz(DSum("Qty","tblPrintOrdTranxDetail","PartN = '" & [txtPartN] & "' AND [toWH] = 'AM' AND PrintOrdDetailComplete = 0"),0)

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.