RickHunter84
Registered User.
- Local time
- Today, 15:59
- Joined
- Dec 28, 2019
- Messages
- 85
Hello friends,
I need a hand with a DSUM calculation I'm trying to do, here is the test code:
I'm trying to add [QtySold] only where the [SL] matches in the tblSalesOrderHistory and either the word "Sale" or "Exchange" are present, if the criteria finds something else that doesn't matched then I don't want it to add.
Please let know how would you change the syntax, the result I get doesn't match the expected.
Thank you in advance.
Rick
I need a hand with a DSUM calculation I'm trying to do, here is the test code:
Code:
Me.qaTest.Value = Nz(DSum("[QtySold]", "tblSalesOrderHistory", "[SL_FK]=" & Form!SL.Value & " and [TransactionType]='Sale'" & " or [TransactionType]='Exchange'"), 0)
I'm trying to add [QtySold] only where the [SL] matches in the tblSalesOrderHistory and either the word "Sale" or "Exchange" are present, if the criteria finds something else that doesn't matched then I don't want it to add.
Please let know how would you change the syntax, the result I get doesn't match the expected.
Thank you in advance.
Rick