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
|
|||
|
|||
(in Access) I used "IIF" statement and get answers, but also get .
In an Access Query, I used an "IIF" statement where it looks at another field
and if the filed contains a certain word, it brings back the value of another one (and vice versa). It works, except when I run it, it gives me an input box for that field. Not sure how to make it go away. Here's the IIf Statement: USD Traded: IIf(([PCurr]="USD"),[SumOfPAmount],(IIf(([SCurr]="USD"),[SumOfSAmount],0))) |
#2
|
|||
|
|||
Hi,
I am not clear about your question. I assume that you have a table with at least four fields: PCurr, PAmt, SCurr and SAmt, meaning that each record could have data in one or more of these fields. Do we assume that, if PCurr has a currency type, SCurr is blank as shown below? PCurr PAmt SCurr SAmt USD 2 XXX 3 USD 4 XXX 5 USD 6 "KMORGADO" wrote: In an Access Query, I used an "IIF" statement where it looks at another field and if the filed contains a certain word, it brings back the value of another one (and vice versa). It works, except when I run it, it gives me an input box for that field. Not sure how to make it go away. Here's the IIf Statement: USD Traded: IIf(([PCurr]="USD"),[SumOfPAmount],(IIf(([SCurr]="USD"),[SumOfSAmount],0))) |
#3
|
|||
|
|||
Ken,
Thanks for your response. You're right, the table has at least those fields. My IIF statement is looking for a specific currency (say USD) in either "PCurr" or "SCurr". If USD is found, say on "PCurr", I want the IIF statement to bring back the amount (as an answer on this new field) from "PAmount" or if USD is found on "SCurr" then return "SAmount". Like I said, it works fine and the answers are correct, it is just that I get an Input Box asking for amounts related to "PAmount" or "SAmount". I'm guessing because of the brackets I show. I just want that box to not appear for my users. Thanks. "Ken Hudson" wrote: Hi, I am not clear about your question. I assume that you have a table with at least four fields: PCurr, PAmt, SCurr and SAmt, meaning that each record could have data in one or more of these fields. Do we assume that, if PCurr has a currency type, SCurr is blank as shown below? PCurr PAmt SCurr SAmt USD 2 XXX 3 USD 4 XXX 5 USD 6 "KMORGADO" wrote: In an Access Query, I used an "IIF" statement where it looks at another field and if the filed contains a certain word, it brings back the value of another one (and vice versa). It works, except when I run it, it gives me an input box for that field. Not sure how to make it go away. Here's the IIf Statement: USD Traded: IIf(([PCurr]="USD"),[SumOfPAmount],(IIf(([SCurr]="USD"),[SumOfSAmount],0))) |
Thread Tools | |
Display Modes | |
|
|