IIf statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can somebody tell me if it is better to have one long iif statement or should it be boken up into 2 if possible? Is there some general do's and don't's about using iff statements in queries?
 
I make user-defined functions for any IIf() that nests more than 2 IIf()s
deep. From reviewing these NGs for the past several years, I would suggest
there are far too many IIf()s and other expressions that should be
maintained in data rather than complex expressions. At the very least, place
the logic into modules.

Also, if nesting more than 2 IIf()s, might be more maintainable using
Switch().

--
Duane Hookom
MS Access MVP


Bob said:
Can somebody tell me if it is better to have one long iif statement or
should it be boken up into 2 if possible? Is there some general do's and
don't's about using iff statements in queries?
 

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