Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Pardeeville, Wisconsin, USA
    Thanked 0 Times in 0 Posts

    Iff Statement (Access 2003)

    I have an IIf statement in a calculated control [TotalCost] on a sbrpt, which returns 0 if the condition is false. I then have a calculated control in the sbrpt footer which sums the [TotalCost]; however, my calculation in the sbrpt footer is not picking up the 0, instead returning the answer based on the [sumofTotalCost]. I could have a situation where there would be more that one record with one being false, while the other could be true. This is the IIF statement in my calculated control [TotalCost] =IIf([Warranty]="No",[SumofCost],0)

    I would appreciate any help I might be able to get on figuring this out.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Iff Statement (Access 2003)

    You should repeat the expression in the control in the subreport footer:


    By the way, if Warranty is a text field, this expression is OK. However, if Warranty is a Yes/No field, you should test on [Warranty]=False (without quotes) instead of [Warranty]="No".

Posting Permissions

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