Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Multiple IIF Statement

    Ok, dunno how much sense this is gonna make but i will try so please bear with me:

    I have a query which has 4 fields in it.

    They are labelled:

    Total
    StdRestartTime
    ToleranceBottom (is the Total-5%)
    ToleranceTop (Is the Total +5%)

    I need a new field that clearly defines to me the following:

    Where the Total is less than or equal to ToleranceBottom, i need a "1"
    Where the Total is more than or equal to ToleranceTop, i need a "2"
    Where the Total is between the ToleranceTop and ToleranceBottom, i need a "0"

    Please help

    Cheers

    Andy

  2. #2
    Join Date
    May 2004
    Posts
    4
    In the query add a field, in the fieldname enter the following

    YourExpr: iif([YourTable].[Total] <= [YourTable].[ToleranceBottom];1;iif([YourTable].[Total] >= [YourTable].[ToleranceTop];2;0))

    This should work.

    mvrp350
    Last edited by mvrp350; 10-05-06 at 05:46.

Posting Permissions

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