In a report and in an unbound form text box, I would like to display a narrative description based upon data (text) from various fields in an underlying table. I know how to do this in a form and report using the IIf() function and the "&" operator. My problem is that after accomodating the various conditions that exist in my data to create a properly worded description, my code is greater than the some 2,288 characters allowed in an expression. Can anyone think of another way to do this?
Here is an example of my code:
="The property contains a " & (IIf(IsNull([STORIES]),"",(IIf([STORIES]=1,"one",(IIf([STORIES]=2,"two",(IIf([STORIES]=3,"three",(IIf([STORIES]=4,"four","one"
))))))))) & (IIf(IsNull([HALFSTORY]),"-story "," and a half-story "
) & (IIf(IsNull([FUNCT_CUR]),"structure",(IIf([FUNCT_CUR]="Other","structure",(IIf([FUNCT_CUR]="Social" Or [FUNCT_CUR]="Government" Or [FUNCT_CUR]="Education" Or [FUNCT_CUR]="Recreation" Or [FUNCT_CUR]="Transportation"," a " & LCase([FUNCT_CUR]) & " building",(IIf([FUNCT_CUR]="Landscape"," a " & LCase([FUNCT_CUR]) & " feature",LCase([FUNCT_CUR])))))))) & (IIf(IsNull([PLAN]) And IsNull([STYLE1]) And IsNull([STYLE2]) And IsNull([STYLE3]),". "," with"
))
Also, once it is generated, is there a way to save the resulting text to a separate field in the table?
Thanks!
Here is an example of my code:
="The property contains a " & (IIf(IsNull([STORIES]),"",(IIf([STORIES]=1,"one",(IIf([STORIES]=2,"two",(IIf([STORIES]=3,"three",(IIf([STORIES]=4,"four","one"
Also, once it is generated, is there a way to save the resulting text to a separate field in the table?
Thanks!