If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
IIF/UpdateQuery/AppendQuery???
This morning I got help with the IIF statement but now it got a little more
complicated (to me): the original: If StdPrice = 0, give me "rebill" If Part# ends with "OSP",give me "outside processing" now in addition i need: If StdPO or = 0, "Performance" If StdPO 0, "Economics" This is what I did: IIf([StdPrice]=0, "Rebill", IIf([StdPO]0, "Economics", IIf([StdPO]0, "Performance", IIf(Right([Item Number],3)="OSP", "Outside Processing","")))) My problem: [StdPO] - this is a calculated field Std-PO: [StdPrice]-[POFunctionalPrice] So I guess my IIF is not working because it is using another calculation that the query is calculating at the same time! How can I do this calculation? 2 different queries? Suggestions please! Thanks! Susan =IIF([StdPrice]=0,"rebill",IIF(Right([Part#],4)="-OSP","outside processing","neither rebill nor outside")) "susan" wrote: I need help with an IIF statement for the following: If StdPrice = 0, give me "rebill" If Part# ends with "-OSP",give me "outside processing" I got the first part to get "rebill" but I can't figure out how to write the "part# ends with -OSP"... Please help! Thanks, Susan |
#2
|
|||
|
|||
IIF/UpdateQuery/AppendQuery???
How can I do this calculation?
If it is using the same table then just repeat it in this query. According to your IIF statement you could possibly have one of the following as output -- Rebill Economics Performance Outside Processing or nothing. It seems to me you would never get to the fourth IIF statement as you checked for zero, less than zero, and greater than zero. -- KARL DEWEY Build a little - Test a little "susan" wrote: This morning I got help with the IIF statement but now it got a little more complicated (to me): the original: If StdPrice = 0, give me "rebill" If Part# ends with "OSP",give me "outside processing" now in addition i need: If StdPO or = 0, "Performance" If StdPO 0, "Economics" This is what I did: IIf([StdPrice]=0, "Rebill", IIf([StdPO]0, "Economics", IIf([StdPO]0, "Performance", IIf(Right([Item Number],3)="OSP", "Outside Processing","")))) My problem: [StdPO] - this is a calculated field Std-PO: [StdPrice]-[POFunctionalPrice] So I guess my IIF is not working because it is using another calculation that the query is calculating at the same time! How can I do this calculation? 2 different queries? Suggestions please! Thanks! Susan =IIF([StdPrice]=0,"rebill",IIF(Right([Part#],4)="-OSP","outside processing","neither rebill nor outside")) "susan" wrote: I need help with an IIF statement for the following: If StdPrice = 0, give me "rebill" If Part# ends with "-OSP",give me "outside processing" I got the first part to get "rebill" but I can't figure out how to write the "part# ends with -OSP"... Please help! Thanks, Susan |
Thread Tools | |
Display Modes | |
|
|