StoneDogPrime
StoneDogPrime

Reputation: 21

MS Access VBA DSUM Multiple Criteria

I've been trying variations of this for a couple of hours and it has me stumped.

I need to count the quantity of something in a table if a different column in the same table = YES. This is what I have...

= DSum("PO_Qty", "DeliveryByMonth_2_tbl", "[LIFNR]='" & [Combo524] & " And [M_0]=YES" & "'")

Any help is appreciated!

MS ACCESS 2010

Upvotes: 1

Views: 1493

Answers (1)

StoneDogPrime
StoneDogPrime

Reputation: 21

I always find the answer right after I post! The below works perfectly. Stupid syntax error.

Me.ThisMonth = DSum("PO_Qty", "DeliveryByMonth_2_tbl", "[LIFNR]='" & [Combo524] & "' And [M_0]='YES'")

Upvotes: 1

Related Questions