Nested If statements

  • Thread starter Thread starter Bill Egnor
  • Start date Start date
B

Bill Egnor

I am trying to nest two if statments. The syntax looks
right but I keep getting a comma error statement. The if
stament looks like this:

Dealer Prorate: ((Iif(orders!renewals=No ),(Software!
[Dealer Net Cost]),(Iif((Software!
SubscriptionSoftware=Yes),(Software![Dealer Net Cost]/12)*
(13-CInt((Month(orders![Install Date])))),(Software!
[Dealer Net Cost])),(Software![Dealer Net Cost]))*(orders!
[Number software]))

If anybody out there can help me, it would stop me from
going completely bald.


Thanks,


Bill
 
Hi,


The first iif is wrong, I didn't look further...


iif( a)

if wrong, you are missing the last two arguments.

Your first iif does just that.


use a Switch( ) for complex embedding, it is cleaner (easier to maintain, to
modify).


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top