A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIF Function



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2005, 12:16 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default 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  
Old November 21st, 2005, 12:39 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default 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  
Old November 21st, 2005, 01:31 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.