Dlookup

Bob M

Registered User.
Local time
Today, 11:39
Joined
Sep 11, 2002
Messages
42
I have a control on a subform whose control source is:

DLookup("[FullName]","tblUserInfo","[EmployeeID] = " & Me.PreviousOwner)

PreviousOwner is a longInteger and EmployeeID is an autoNumber. On another form when ownership of equipment changes hands, I simply pick another user from a drop down list and select the previous owner from another drop down list.

When I open the form and subform I get #Name?. Where am I going wrong?
 
Try:

=DLookup("[FullName]","tblUserInfo","[EmployeeID] = " & Me.Parent.PreviousOwner)
 
DLookup

PreviousOwner is not on the parent form, it's on the same form as the control.
 
=DLookup("[FullName]","tblUserInfo","[EmployeeID] = " & [PreviousOwner])
 
DLookup

Thanks Kevin. That worked. Keep up the good work.
 

Users who are viewing this thread

Back
Top Bottom