nz with dlookup

  • Thread starter Thread starter sheniece via AccessMonster.com
  • Start date Start date
S

sheniece via AccessMonster.com

I have this as the controlsource for a textbox : =nz(DLookUp
("ContactDurationdesc","tblContactDuration","ContactDurationID=" &
[ContactDurationID]),"")

should'nt this statement return an empty string if the value is null, it's
returning #Error instead on the null values..
 
It should return empty value, but that only if the dlookup return Null.

If the DlookUp return #Error then the Nz won't make a different and the
#Error will apear.

Check the DlookUp first if It's correct

For example, if the ContactDurationID field is string type add single quote:
=DLookUp ("ContactDurationdesc","tblContactDuration","ContactDurationID='" &
[ContactDurationID] & "'")
 
Back
Top