Hello,
I have a report that displays Properties, Units and Tenants. I have succesfully grouped and the report looks nice. For my question lets say I have a property with 3 units and only 2 units are occupied by Tenants. Now when I open my report the first and last names of the tenants show up nicely and the other field (empty or vacant unit) shows up empty.
I want to use code to validate if the Tenant ID field is the number 0 (no tenant in the unit), and if it is, I want to put the word "VACANT" in the [First Name] field of the report.
I use this code in the source field and it will show the VACANT, but it gives an #error when the the expression is FALSE
=IIf([Tenant ID]=0,"VACANT",[First Name])
What do I do wrong?
Thank you,
Richard
I have a report that displays Properties, Units and Tenants. I have succesfully grouped and the report looks nice. For my question lets say I have a property with 3 units and only 2 units are occupied by Tenants. Now when I open my report the first and last names of the tenants show up nicely and the other field (empty or vacant unit) shows up empty.
I want to use code to validate if the Tenant ID field is the number 0 (no tenant in the unit), and if it is, I want to put the word "VACANT" in the [First Name] field of the report.
I use this code in the source field and it will show the VACANT, but it gives an #error when the the expression is FALSE
=IIf([Tenant ID]=0,"VACANT",[First Name])
What do I do wrong?
Thank you,
Richard