Subject should say DSUM with multiple criteria, sorry.
I'm having a hard time getting this criteria to work for me.
I have a table called Extractsales that contains the following Fields:
RecordID
SalesDate
ItemSold - This is referenced to the id of an item in another table
NumberSold
TotalAmount
I'm trying to create a query giving me the total number of a specific item that was sold during current year.
I'm using Dsum syntax as followed:
Test: DSum("[Numbersold]","ExtractSales","[itemsold]=1" And "Year( [ExtractSales]![SalesDate]=Year(Date()")
When I run the query, its giving me a count of 19 which is actually the total items sold which includes item number 2. Of the 19 only 15 of those are for "item 1".
Can anyone help me. I just started figuring out Dsum syntax last night and now i'm obsessed with getting this right!
Thanks a bunch in advance.
I'm having a hard time getting this criteria to work for me.
I have a table called Extractsales that contains the following Fields:
RecordID
SalesDate
ItemSold - This is referenced to the id of an item in another table
NumberSold
TotalAmount
I'm trying to create a query giving me the total number of a specific item that was sold during current year.
I'm using Dsum syntax as followed:
Test: DSum("[Numbersold]","ExtractSales","[itemsold]=1" And "Year( [ExtractSales]![SalesDate]=Year(Date()")
When I run the query, its giving me a count of 19 which is actually the total items sold which includes item number 2. Of the 19 only 15 of those are for "item 1".
Can anyone help me. I just started figuring out Dsum syntax last night and now i'm obsessed with getting this right!
Thanks a bunch in advance.