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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIF statement, proper formula



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2010, 02:37 PM posted to microsoft.public.access.queries
jligue via AccessMonster.com
external usenet poster
 
Posts: 6
Default IIF statement, proper formula

Not entirely sure if the IIF statement is the correct way to go about this, I
have a field on a query that has total pounds of either printed or plain
product. I want to add a column to my query that only adds up the printed
product.
So, if "product type" is like printed, then add up a total, is basically what
I am
trying to say.
Can you help me with the proper formula?

--
Message posted via http://www.accessmonster.com

  #2  
Old February 19th, 2010, 02:43 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default IIF statement, proper formula

Assuming you have:
- a Text field named product type
- a Number field named pounds
put a text box in the Report Footer section, and set its Control Source to:
=Sum(IIf([product type] Like "*printed*", [pounds], 0))

--
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.


"jligue via AccessMonster.com" u56071@uwe wrote in message
news:a3deb48537c8f@uwe...
Not entirely sure if the IIF statement is the correct way to go about
this, I
have a field on a query that has total pounds of either printed or plain
product. I want to add a column to my query that only adds up the printed
product.
So, if "product type" is like printed, then add up a total, is basically
what
I am
trying to say.
Can you help me with the proper formula?


 




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


All times are GMT +1. The time now is 03:18 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.