This may not be logical, but can you use a field from within a query as criteria in a dsum expression in the same query?
This is the expression I currently use:
This Week: DSum("Quantity","QryStockOutGroup","[MyWeek] = Forms!FrmStockOutGroup!MyWeek And [MyYear] = Forms!FrmStockOutGroup!MyYear And [Grp] = 'Coffee'")
What I am trying to do is substitute "[Grp] = 'Coffee'" with "Grp = the field within the query where coffee is one of them"
Hope this makes sense!
Thanks
.
This is the expression I currently use:
This Week: DSum("Quantity","QryStockOutGroup","[MyWeek] = Forms!FrmStockOutGroup!MyWeek And [MyYear] = Forms!FrmStockOutGroup!MyYear And [Grp] = 'Coffee'")
What I am trying to do is substitute "[Grp] = 'Coffee'" with "Grp = the field within the query where coffee is one of them"
Hope this makes sense!
Thanks
.