Access ACCESS DLOOKUP INVALID USE OF NULL

Joined
Feb 26, 2013
Messages
12
Reaction score
0
Hey guys I have 3 DLookups to return values in access vba from 2 different tables;
Below is the code that I am using;

EmpName = DLookup("[Name]", "dbo_BomEmployee", "Employee =" & BUILDID)

OvenName = DLookup("[Name]", "dbo_BomEmployee", "Employee =" & OVENID)

NewStatus = DLookup("[Status]", "Employees_Performance", "LotNumber =" & LOTNUMBER)

The top 2 DLookups work fine but the bottom one throws an 'Invalid use of Null' error message. I have checked the Employees_Performance table and LOTNUMBER (lets say for arguments sake is 290856-2 is in there under the LotNumber column.

Any ideas as to where I am going wrong.

Thanks for any replies in advance.
 
Back
Top