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  

help with nested iif statement



 
 
Thread Tools Display Modes
  #1  
Old December 30th, 2009, 01:59 AM posted to microsoft.public.access.queries
Help with complex nested iif statement
external usenet poster
 
Posts: 1
Default help with nested iif statement

I have a table and I want to create a query that has a new field "
Type of Shipment" base on a field "Item Category"

If the item category field equals ZDIR, ZTRN ...etc up to 23 different item
categories the "Type of Shipment field will equal DIRECT else I would like it
to return "Stock"
Any help will be greatly appreciated.

Thanks
  #2  
Old December 30th, 2009, 02:47 AM posted to microsoft.public.access.queries
Benjamins via AccessMonster.com
external usenet poster
 
Posts: 68
Default help with nested iif statement

Hi,

for the iif statement. What you can do is:
IIf(category = 'ZDIR' OR category = 'ZTRN' OR .............,'DIRECT','')

Having a long nested if is a headache. What i can suggest is to add the field
to the table.

Help with complex nested iif statement wrote:
I have a table and I want to create a query that has a new field "
Type of Shipment" base on a field "Item Category"

If the item category field equals ZDIR, ZTRN ...etc up to 23 different item
categories the "Type of Shipment field will equal DIRECT else I would like it
to return "Stock"
Any help will be greatly appreciated.

Thanks


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200912/1

  #3  
Old December 30th, 2009, 02:48 AM posted to microsoft.public.access.queries
Benjamins via AccessMonster.com
external usenet poster
 
Posts: 68
Default help with nested iif statement

Hi,

for the iif statement. What you can do is:
IIf(category = 'ZDIR' OR category = 'ZTRN' OR .............,'DIRECT','STOCK')

Having a long nested if is a headache. What i can suggest is to add the field
to the table.

Help with complex nested iif statement wrote:
I have a table and I want to create a query that has a new field "
Type of Shipment" base on a field "Item Category"

If the item category field equals ZDIR, ZTRN ...etc up to 23 different item
categories the "Type of Shipment field will equal DIRECT else I would like it
to return "Stock"
Any help will be greatly appreciated.

Thanks


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200912/1

 




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 02:08 PM.


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