DLookup criteria problem
Posted on 2010-09-13
I am using DLookup in an unbound field in a report. I want it to look up the field in a query with criteria for age = "<5" and with a year in the "Year" field in the query that matches the "rYear" field in the report. All fields are text data type. The query is called "All Other disease" and the field in the query is called "Abscess". The code I'm using works fine without the last part with year, but once I add in the year criteria I get #NAME.
=DLookup("Abscess","All Other disease","[Age]='<5' and [Year] like [rYear]")