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?
 
Back
Top