DSUM problem

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

I have

ProductID Qty UP
75 20 4.9
75 30 4.8
77 22 3.9
78 23 4.8




I can query the total quantity of order as below

OrdersOverALL: Nz(DSum("Qty","Orders"),0)

What is the correct syntax to do sum by productID. I cannot get answer from
expression below

OrdersOverALL: Nz(DSum("Qty","Orders","ProductID"=ProductID),0)
 
You're very close... put the = sign inside the quotes, and concatenate the
value of the ProductID field into the string:

OrdersOverALL: Nz(DSum("Qty","Orders","ProductID=" & ProductID),0)
 
Yes. It works!

Thank you

SF
Ken Snell said:
You're very close... put the = sign inside the quotes, and concatenate the
value of the ProductID field into the string:

OrdersOverALL: Nz(DSum("Qty","Orders","ProductID=" & ProductID),0)
 
Back
Top