nz with dlookup

  • Thread starter sheniece via AccessMonster.com
  • 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..
 
G

Guest

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] & "'")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top