Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Posts
    15

    Unanswered: IIf help in report

    I'm currently working on a report and I'm trying to use an "if-then" type statement to state if the sum of something is either a "yes" or a "no" in a report; i've completed seperate if-then statements in the report seperately successfully, however I'm having some difficulty with this statement.

    My current data is as follows:

    Textbox1: 5
    Textbox2: 7
    Textbox3: 8
    Textbox4: 9

    My expression is as follows:

    =iif(([Textbox1]+[Textbox2]+[Textbox3]+[Textbox4])>=70, "yes", "no")

    Based on the values above which sum to 29 i expect the box with my expression to display a "no" however the box keeps displaying a "yes" and I'm not sure what I'm doing wrong.

    Please help

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,468
    Provided Answers: 10
    why not do the summing in the Query


    the textbox are text so you can't sum it
    but this mite work

    =iif((nz([Textbox1],0)+nz([Textbox2],0)+nz([Textbox3],0)+nz([Textbox4],0))>=70, "yes", "no")
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

  3. #3
    Join Date
    Apr 2009
    Posts
    15
    Awesome, thanks for your reply, ill try it tomorrow.

Posting Permissions

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