Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Unanswered: #Error for Iif statement

    I have the following if statement in a report:

    =IIf("#Error",0,[Field 1])

    The report will show #Error if there is no data for the report, so when I use this If statement it will replace the #Error with 0. The only problem is when there is data available, it still keeps the 0. I know that it will show data, if there is data for the report and I take out the If Statement. Anyone else seen this issue and know how to resolve?

    Thanks,

  2. #2
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    How about this:

    =nz([field 1], 0)

    which is the same as =Iif(IsNull([Field 1]), 0, [Field 1])

  3. #3
    Join Date
    Dec 2004
    Posts
    2
    I've tried the NZ way as well. I have a form that shows the same information that the report does, it works on the form. But, I still get a #Error on the report.

  4. #4
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    If what = Error#?

    Try this:

    =IIf([Field 1]="#Error",0,[Field 1])

    TD

Posting Permissions

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