I'm trying to evaluate nulls returned from a DLookup. If a Null comes in, all I want to do is change the text displayed in a textbox to "N/A". If it's not Null, I want to display a value from DLookup.
Below is the Control Source for the textbox:
IIf(DLookup("[equipExpiry]","tblEquipAttributes","equipID = [txtEquipID])" Is Null, "N/A", DLookUp("[equipExpiry]","tblEquipAttributes","equipID = " & [txtEquipID]))
Seems simple enough, but I'm getting #Name?.
Can anyone point out my problem? Thanks!
Below is the Control Source for the textbox:
IIf(DLookup("[equipExpiry]","tblEquipAttributes","equipID = [txtEquipID])" Is Null, "N/A", DLookUp("[equipExpiry]","tblEquipAttributes","equipID = " & [txtEquipID]))
Seems simple enough, but I'm getting #Name?.
Can anyone point out my problem? Thanks!