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 Function
Dear Sir,
I encounteretd problem regarding with my work and its difficult for me to fidn the coorect syntax for this problem. Here is the sample problem: Side Order Value Buy 25,000.00 Sell 24,250.00 Buy 23,200.00 Buy 500.00 Sell 20,210.00 Hence, in report I want to get the total Order value if the Side = "Buy". Also, for Side = "Sell" to get the total Order Value. Thank your very much in advance if you could give me an idea or the correct syntax in my part. Kind regards. |
#2
|
|||
|
|||
IIF Function
Create a query into this table.
Type this expression into a fresh column in the Field row: BuyAmount: IIf([Side] = "Buy", [Order Value], 0) In the next column, in the field row: SellAmount: IIf([Side] = "Sell", [Order Value], 0) You can now create a report with columns for BuyAmount and SellAmount, and total the columns if desired. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. wrote in message oups.com... Dear Sir, I encounteretd problem regarding with my work and its difficult for me to fidn the coorect syntax for this problem. Here is the sample problem: Side Order Value Buy 25,000.00 Sell 24,250.00 Buy 23,200.00 Buy 500.00 Sell 20,210.00 Hence, in report I want to get the total Order value if the Side = "Buy". Also, for Side = "Sell" to get the total Order Value. Thank your very much in advance if you could give me an idea or the correct syntax in my part. Kind regards. |
#3
|
|||
|
|||
IIF Function
Or just add a text box in a Group or Report Header or Footer with a control
source like: =Sum(Abs([Side]="Buy") * [Order Value]) =Sum(Abs([Side]="Sell") * [Order Value]) -- Duane Hookom MS Access MVP -- "Allen Browne" wrote in message ... Create a query into this table. Type this expression into a fresh column in the Field row: BuyAmount: IIf([Side] = "Buy", [Order Value], 0) In the next column, in the field row: SellAmount: IIf([Side] = "Sell", [Order Value], 0) You can now create a report with columns for BuyAmount and SellAmount, and total the columns if desired. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. wrote in message oups.com... Dear Sir, I encounteretd problem regarding with my work and its difficult for me to fidn the coorect syntax for this problem. Here is the sample problem: Side Order Value Buy 25,000.00 Sell 24,250.00 Buy 23,200.00 Buy 500.00 Sell 20,210.00 Hence, in report I want to get the total Order value if the Side = "Buy". Also, for Side = "Sell" to get the total Order Value. Thank your very much in advance if you could give me an idea or the correct syntax in my part. Kind regards. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SPELL CURRENCY FUNCTION | Rajesh | Using Forms | 1 | October 1st, 2005 11:04 PM |
Attaching Code | DS | General Discussion | 2 | August 22nd, 2005 11:21 PM |
Embedded Application Icon | Irshad Alam | General Discussion | 5 | April 5th, 2005 02:16 PM |
Need a ISWorkday Function -- Any Ideas | Mark | Worksheet Functions | 5 | March 29th, 2005 01:58 AM |
UK postcode issue | Lapchien | Running & Setting Up Queries | 6 | June 11th, 2004 09:06 PM |