Too many IIF statements

H

hoachen

I am trying to compare and check many fields by using many IIF statement to
do it. However, on access it has the limitation on how many words or
statments you can put on the query field. My question is what's the best way
to do this instead of placing the iif statment directly on the query and have
the same result as run the query?
 
D

Daryl S

Hoachen -

You didn't give many details, but you could write a user-defined function
for this. You would pass in whatever criteria you are using in your IIF
statements, and return the value you are looking for. In the function, you
could use a SELECT CASE construct to replace multiple nested IIF statements.
If you want more help, you'll need to post your existing IIF statements and
an explanation of what you want to do.
 
G

golfinray

IIF statements are limited to 255 characters I think. Sometimes a replace
statement can work for an IIF. Or you may have to use a select and then case.
Look in help on those, they are not that difficult to set up.
 

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

Similar Threads


Top