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
|
|||
|
|||
Assigning text response to a value
In quering a sales database, if the sales amount is positive how do I get the
query to add "Sale" in another field or if the sales is negative have it add "Refund" in the another field -- Dave |
#2
|
|||
|
|||
Assigning text response to a value
cowichandave wrote:
In quering a sales database, if the sales amount is positive how do I get the query to add "Sale" in another field or if the sales is negative have it add "Refund" in the another field Try adding a calculated field to the query. Just put an expression like: IIf([sales amount0,"Refund","Sale") in a blank column in query's design view. -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Assigning text response to a value
Try this --
Type_Action: IIF(Nz([Money], "Error")1, "Sale", "Refund") -- Build a little, test a little. "cowichandave" wrote: In quering a sales database, if the sales amount is positive how do I get the query to add "Sale" in another field or if the sales is negative have it add "Refund" in the another field -- Dave |
#4
|
|||
|
|||
Assigning text response to a value
Thank you both. I used Marshalls simpler answer and it works very well.
-- CowichanDave "Marshall Barton" wrote: cowichandave wrote: In quering a sales database, if the sales amount is positive how do I get the query to add "Sale" in another field or if the sales is negative have it add "Refund" in the another field Try adding a calculated field to the query. Just put an expression like: IIf([sales amount0,"Refund","Sale") in a blank column in query's design view. -- Marsh MVP [MS Access] . |
Thread Tools | |
Display Modes | |
|
|