Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested Iif problem...

Status
Not open for further replies.

straybullet

IS-IT--Management
Jun 5, 2003
593
US
What I'd like to get...

If [Pricing_Policy] = Standard, Result = Standard
If [Pricing_Policy] = Individual*, Result = [SalePrice2]
If [Pricing_Policy] = Included*, Result = [NetUpSP1]

For some reason, I can get the Standard and Included results to show properly in the textbox with:

=IIf([Pricing_Policy]="Indiv*",[SalePrice2],(IIf([Pricing_Policy]="Included*",0,(IIf([Pricing_Policy]="Standard","Standard",[NetUPSP1])))))

However, the Individual shows [NetUpSP1] (value is zero if the item is individually priced) rather than [SP2]. Any suggestions?

Let them hate - so long as they fear... Lucius Accius
 
This version should get you what you want.

=IIf([Pricing_Policy]="Individual*",[SalePrice2],IIf([Pricing_Policy]="Included*",[NetUPSP1],IIf([Pricing_Policy]="Standard","Standard",0)))


I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top