Hello again, I'm trying to get this dlookup working -
it is using to vba variables as the critera - first name and last name, the dlookup works ok with either one but i have to use both as we have lots of people with the same first or last names.
i have tried various combinations of single and double quotes all over the place and just got confused by it all, the line below is the closest i've got so far. but it returns a syntax error of -
syntax error in string in query expresion '[Firstname]='Firstname1' AND [Lastname] = 'Lastname1'
tt = DLookup("[Code #]", "Employees", "[First Name]= '" & t1 & "' AND " & "[Last Name] = '" & t2 & "")
I do hope someone can help with this...