dlookup #name? error (1 Viewer)

Patchy

Registered User.
Local time
Today, 13:47
Joined
Sep 8, 2013
Messages
18
I am trying to get the surnames of customers to populate based on the selected product groups, product models and first names. The expression below results in #name? error. What did I do wrong?

Please note that I do not have a primary key in the query. I only have unique records.

Code:
DLookup("[Surname]", "[query]", "[Product Group] ='" & Forms![Add Product Info]![Product Group] & "' AND [Product Model] ='" & Forms![Add Product Info]![Product Model] & "' AND [First Name] ='" & Forms![Add Product Info]![First Name] & "' ")
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 06:47
Joined
Jan 20, 2009
Messages
12,851
Expressions need to be preceded by an equals sign.

However I doubt DLookup would be your solution because it only returns one record. A subform is probably more likely.
 

Users who are viewing this thread

Top Bottom