Solved

Nested IF statement visual studio 2005

Posted on 2013-06-17
2
528 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 48

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now