Solved

Nested IF statement visual studio 2005

Posted on 2013-06-17
2
563 Views
Last Modified: 2013-06-18
In the properties on a table column I need the column to print if I have a specific department.

If the department is "parts","service",or "special" I don't want it to print.

Something like

=IIF(Fields!DEPT_NAME.Value = "Parts",true,IIF (Fields!DEPT_NAME.Value = "service",true,(
 IIF Fields!DEPT_NAME.Value = "Special",true,false))

If I get the syntax correct (no red line) then I get some kind of error when I execute.

The expression is in a table column under the visibility property.
0
Comment
Question by:meagain0707
2 Comments
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39255401
Hi,

maybe

: IIf([Fields]![DEPT_NAME].[Value]="Parts",True,IIf([Fields]![DEPT_NAME].[Value]="service",True,IIf([Fields]![DEPT_NAME].[Value]="Special",True,False)))
EDIT

IIf(([Fields]![DEPT_NAME].[Value]="Parts" Or [Fields]![DEPT_NAME].[Value]="service" Or [Fields]![DEPT_NAME].[Value]="Special");True;False)

Regards
0
 

Author Closing Comment

by:meagain0707
ID: 39257589
The syntax was different, it work with this:

=IIf((Fields!DEPT_NAME.Value="Service" Or Fields!DEPT_NAME.Value="Deli" OR
 Fields!DEPT_NAME.Value="Special"
 OR Fields!DEPT_NAME.Value="Parts"
  OR Fields!DEPT_NAME.Value="power"
  OR Fields!DEPT_NAME.Value="holidays"),True,False)

Thanks
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question