Syntax error in DLookup
I have a table called Affiliates, and want to lookup the city depending on the field afid which is autonumber in the table.This field afid is available also on the report called Invoice.I want the following.If the control afid on the report is 1, then to look up for the city in the table Affiliates,where afid = 1.
If afid is 2, then to look up for the cisty where afid = 2
I have placed the following in the control on the report:
DLookup(“[City]”, “Affiliates”, ” Me! [afid] = ” & 1)
However i receive the following error :
runtime error 3075, Syntax error (missing operator) in query expression
I have also tried the following
DLookup(“City”,”Affiliates”,afid=1)
But again without success.
May i have some further help?