Access 2003

R

Roger Bell

When using the IIf statement in the properties control
source are you restricted with the number of times you
use IIF. It seems to bomb out at 16
 
D

Douglas J. Steele

That sounds familiar. What are you doing that you need so much nesting?
Someone may be able to suggest an alternative.
 
J

John Vinson

When using the IIf statement in the properties control
source are you restricted with the number of times you
use IIF. It seems to bomb out at 16

16 nested IIF's is going to be HORRIBLY inefficient even if you could
get it to work!

Try using the Switch() function instead; it's simpler to implement and
to read. It takes arguments in pairs, and goes through all the
arguments left to right; the value the function returns is the second
member of the first pair for which the first member is true.

It may also be possible to create a new table to do this conversion by
a simple JOIN rather than embedding your logic in code.
 
R

Roger

I am using the IIf statement to look up a postcode when
the suburb is selected. What would be an alternative.
Thanks
 
S

sathyam1968

Dear Roger

According to the rule of nesting, only a maximum of 16 nesting is allowed.
It does not allow more that 16 nestings in iif. This is similar to
subqueries which can be upto 16 levels.

regards
sathyamurthy
*******************
 
Top