Dlookup to retrieve EmpID from Query (1 Viewer)

Fozi

Registered User.
Local time
Today, 08:54
Joined
Feb 28, 2006
Messages
137
I have a form called FRM_FlexiEntries. There are two controls on that form called [Staff Name] and [EmpID].

I am trying to get DLookup to compare the [Staff Name] on the form to its counterpart called [Fullname] in [QRY_StaffDetailswithFullname]. Upon matching I want it to return the [StaffID] to the forms control [EMPID]. Name's controls are text and EmpID/StaffID is numeric.

Two questions:
Is this the correct syntax:
Code:
=DLookUp("[StaffID]","[QRY_StaffDetailswithFullname]","[FullName]= '" & [FRM_Activity and Flexi Entries by Week]![Staff Name] & "'")

Where does the line go?


Thanks to all
Fozi
 

Users who are viewing this thread

Top Bottom