Greetings Experts ~
I'm trying to display an EmpID in one textbox using DLookup and two criteria (the employee's first & last name entered into two other textboxes)
My first attempt below returns only the first EmpID in the EmpID field regardless of what names are typed into the first & last name textboxes.
=IIf(DLookUp("FirstName","Employee","FirstName = '" & [Forms]![Request]![TxtSrchFirstName] & "'")
And (DLookUp("LastName","Employee","LastName = '" & [Forms]![Request]![TxtSrchLastName] & "'")),[EmpID],"")
Below is my second attempt and it returns only a #Name? error
=(DLookUp("EmpID","Employee","[FirstName]= " & [Me].[TxtSrchFirstName] & " And [LastName] = " & [Me].[TxtSrchLastName] & ""))
As always, your help is greatly appreciated ~