Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Criteria Using DLookup Function 1

Status
Not open for further replies.

theSizz

Technical User
Apr 22, 2002
93
US
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.
 
Yes Duane, that does it.
Perfect, thank you very much.

theSizz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top