Guys
Im Having an error code in my textbox of my form Unit2. Its supposed to be error cus when u dont fill in a projectnr, it obviously cant find it. (The Dlook works by the way if it can find it) I just want it to hide the error when there hasnt been filled in a projectnr YET. I tried this but to no avail. Its a text value that it needs to hide by the way.
Code:
=IIf(Nz(DLookUp("KH";"Project";"Projectnr=" & [Projectnr]);"");"")
Or
Code:
=IIf(DLookUp("KH";"Project";"Projectnr=" & [Projectnr]);"");DLookUp("KH";"Project";"Projectnr=" & [Projectnr])
Or
Code:
=IIf(DLookUp("KH";"Project";"Projectnr=" & [Projectnr])=[DbNullValue];"";DLookUp("KH";"Project";"Projectnr=" & [Projectnr]))