Access 2003

  • Thread starter Thread starter Roger Bell
  • Start date Start date
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
 
That sounds familiar. What are you doing that you need so much nesting?
Someone may be able to suggest an alternative.
 
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.
 
I am using the IIf statement to look up a postcode when
the suburb is selected. What would be an alternative.
Thanks
 
The tables should be related and a query used to join them, no code would be
needed *IF* a suburb can have only one postcode.
 
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
*******************
 

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

Back
Top