Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Posts
    2

    Unanswered: That wacky old "IIF"

    I'm attempting to weed out the blank entries in a one-row query for placing onto a one-page report. My goal is to replace these blank entries with 'N/A'. To this end, I used the expression builder to create the following line in the "Control Source" property box of an in-report text-box:

    =IIf(IsEmpty([Map-Number]),'N/A',[Map-Number])

    The "IsEmpty([Map-Number])" command has also been tried as "IsNull([Map-Number])", and "[Map-Number] Is Null", but in all cases, the same problem still occurs;

    When an entry is selected for reporting that does not have a Map-Number, the output is "N/A" as expected; however, when there IS a Map-Number, the report shows an "#Error" in the field.

    The data type of this field, if relevant, is text, and the code line given is a direct cut-n-paste.

    I don't see any syntax errors, but I can't shake the feeling I'm missing something fundamental. Can anyone help?

  2. #2
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Have you tried moving this expression to the underlying query upon which the report is based?

  3. #3
    Join Date
    Feb 2002
    Posts
    2
    Just tried it, and the problem appears to have gone away. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •