I’m trying to do a lookup in a report that that uses a totals query as its record source.
The report should show sales for week 12 of this year versus sales for week 12 of last year.
The table that the query uses has a field named Yr whose data type is number and a field named Week whose data type is also number. In the query I created an expression NewYr:[Yr]-1
This is the formula I placed in an unbound text control in the report.
=DLookUp("SumOfNet","qryCompareNet","[Week]+[Yr]=" & [week]+[NewYr])
Obviously this does not produce the desired results.
Can someone please help me with the formula to produce the results I’m looking for?
I hope I made myself clear. I guess what I’m asking is can you use multiple criteria for the criteria argument of the function, and what's the proper syntax?
Thanks for your time.
The report should show sales for week 12 of this year versus sales for week 12 of last year.
The table that the query uses has a field named Yr whose data type is number and a field named Week whose data type is also number. In the query I created an expression NewYr:[Yr]-1
This is the formula I placed in an unbound text control in the report.
=DLookUp("SumOfNet","qryCompareNet","[Week]+[Yr]=" & [week]+[NewYr])
Obviously this does not produce the desired results.
Can someone please help me with the formula to produce the results I’m looking for?
I hope I made myself clear. I guess what I’m asking is can you use multiple criteria for the criteria argument of the function, and what's the proper syntax?
Thanks for your time.