Nested IIF problems

firestorm998

Registered User.
Local time
Today, 08:44
Joined
Nov 28, 2006
Messages
24
I had the following IIF statement as the control source for a Form text box:

=IIf([CASH RATE]="TBC","TBC",IIf([EVENT TYPE]="Rights Issue",[Stk Ent 1b]*[Cash Rate],[POsition1]*[Cash Rate]*(1-[Tax rate]/100)))

this worked fine.

I am trying to nest the following(which works fine independantly)into the above statement:
IIf([Event type]="Coupon",[Position1]/[Lot Size]*[cash rate]*(1-[Tax Rate]/100),[position1]*[cash rate]*(1-[Tax rate]/100)))

to give:
=IIf([cash rate]="TBC","TBC",IIf([Event Type]="Rights Issue",[Stk Ent 1b]*[Cash Rate],[POsition1]*[Cash Rate]*(1-[Tax rate]/100),IIf([Event type]="Coupon",[Position1]/[Lot Size]*[cash rate]*(1-[Tax Rate]/100),[position1]*[cash rate]*(1-[Tax rate]/100))))


This keeps giving me a 'Wrong number of arguments' error which i can't for the life of me work out. I'm greatly appreciate it if anyone could point out what is missing!


Thanks.
 
You have more than two arguments (true, false) in one spot:

There is an extra IIF after this:

[POsition1]*[Cash Rate]*(1-[Tax rate]/100)

that part is the FALSE part of one IIF statement but you have another comma and IIF.
 

Users who are viewing this thread

Back
Top Bottom