DLookup Help

Novice1

Registered User.
Local time
Yesterday, 20:44
Joined
Mar 9, 2004
Messages
385
I have a name of a supervisor on my form. I want to use DLookup to retrieve the supervisor's email from another table. I tried ...

=DLookup("[OfficialEmail]", "tblAlphaRoster", "Supervisor = SupvrName")

I want to Look up [OfficialEmail] from tblAlphaRoster in which a field from tblAlphaRoster [Supervisor] matches a field in my current form [SupvrName]

Where am I going wrong?
 
the criteria parameter is wrong - assuming supervisor is a text value it should be

"Supervisor = '" & me.SupvrName & "'"
 
Thank you ... but still getting a syntax error

=DLookup("[OfficialEmail]", "tblAlphaRoster", "Supervisor = '" & me.SupvrName & "'")
 
regret I am not telepathic - 'syntax error' could be one of a thousand possible errors and as far as I can see there is nothing wrong with your syntax so that implies something else
 

Users who are viewing this thread

Back
Top Bottom