I have a DLookup statement that was working fine; however some records have null values in the field being looked up. I originally attempted to add error handling with an IIf(IsNull to the DLookup but found another statement that seemed to be much easier. The example I found looked like this:
= Nz(DLookup("[Commission]", "Employee", "[EMPNO] = '" & nz([EMPNO],"") & "'"),0 )
My DLookup statements looks like this but doesn't work:
=Nz(DLookUp("[First Name] & "" "" & [Last Name]","Staff","[ID] = " & Nz([Primary],"Not Assigned") & "'"),0 )
I feel like I am missing something that should be obvious but have tried to resolve for a couple hours with no success. Can anyone identify my error or provide a better method for my lookup?