Dlookup (1 Viewer)

Bob M

Registered User.
Local time
Today, 00:42
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?
 

Mile-O

Back once again...
Local time
Today, 05:42
Joined
Dec 10, 2002
Messages
11,316
Try:

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

Bob M

Registered User.
Local time
Today, 00:42
Joined
Sep 11, 2002
Messages
42
DLookup

PreviousOwner is not on the parent form, it's on the same form as the control.
 

KevinM

Registered User.
Local time
Today, 05:42
Joined
Jun 15, 2000
Messages
719
=DLookup("[FullName]","tblUserInfo","[EmployeeID] = " & [PreviousOwner])
 

Bob M

Registered User.
Local time
Today, 00:42
Joined
Sep 11, 2002
Messages
42
DLookup

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

Users who are viewing this thread

Top Bottom