R
RichardM
I have a problem using DSum in query with multiple criteria.
I have a query with following fields OrderNo and ItemGroupCode. On third
field I added following function:
PriceSum: DSum("[Price]";"OrderItems";("[ItemGroupCode]= '" & [ItemGroupCode]
& "'" And "[OrderNumber]=" & [OrderNumber]))
This should go into query OrderItems and sum up the Price for in query
specified OrderNumber (number field) and ItemGroupCode (Text field).
In some odd reason it sums sup all rows not according to criteria specified
rows. If I Dsum with one criteria it works but not with two.
Could please any tell me where is the problem.
Many Thanks
Rich
I have a query with following fields OrderNo and ItemGroupCode. On third
field I added following function:
PriceSum: DSum("[Price]";"OrderItems";("[ItemGroupCode]= '" & [ItemGroupCode]
& "'" And "[OrderNumber]=" & [OrderNumber]))
This should go into query OrderItems and sum up the Price for in query
specified OrderNumber (number field) and ItemGroupCode (Text field).
In some odd reason it sums sup all rows not according to criteria specified
rows. If I Dsum with one criteria it works but not with two.
Could please any tell me where is the problem.
Many Thanks
Rich