Too many IIF statements

  • Thread starter Thread starter hoachen
  • Start date Start date
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?
 
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.
 
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.
 
Back
Top