Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Location
    FL
    Posts
    50

    Unanswered: #Error in Report with iif() condition

    Hi,

    I have created a report in Access 2000. While using following condition in the value of the field, I am getting error...

    iif ([APPRVALUE]=0,[SALESPRICE],[APPRVALUE])

    It gives error for all records that has APPRVALUE(>0). Now if I change as...

    iif ([APPRVALUE]=0,[APPRVALUE],[SALESPRICE])

    it gives error for all records that has SALESPRICE(>0).

    If I enter as...

    iif ([SALESPRICE]=0,[APPRVALUE],[SALESPRICE])

    it gives error for all records that has SALESPRICE(>0). !!!!!!!!!!!

    In other words, what ever I have as FALSE partas non-zero, it would give me an error!!

    Any idea please???

  2. #2
    Join Date
    May 2003
    Location
    New York, NY
    Posts
    225

    Re: #Error in Report with iif() condition

    I assume a that the field may or may not contain a value. If this is so you may what to check and see if the feild contains an empty set or is null. I use the following code to test for these conditions:

    iif([MyValue] & ""="",[NullValue],[MyValue])


    I hope this helps!


    Mark

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Re: #Error in Report with iif() condition

    Originally posted by Sandeep Munshi
    Hi,

    I have created a report in Access 2000. While using following condition in the value of the field, I am getting error...

    iif ([APPRVALUE]=0,[SALESPRICE],[APPRVALUE])

    It gives error for all records that has APPRVALUE(>0). Now if I change as...

    iif ([APPRVALUE]=0,[APPRVALUE],[SALESPRICE])

    it gives error for all records that has SALESPRICE(>0).

    If I enter as...

    iif ([SALESPRICE]=0,[APPRVALUE],[SALESPRICE])

    it gives error for all records that has SALESPRICE(>0). !!!!!!!!!!!

    In other words, what ever I have as FALSE partas non-zero, it would give me an error!!

    Any idea please???
    i don't see anything that wrong with the iif statement that might cause it can you post (i can't down load attachmnets for some reason) the queries SQL and a sample of the data that goes in to it?
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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