Nested If statements

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
 
M

Michel Walsh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top