MS Access 2003 Maximum number of values in a CHOOSE function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meter man
    New Member
    • Oct 2012
    • 1

    #1

    MS Access 2003 Maximum number of values in a CHOOSE function

    I'm using Access 2003 and have a CHOOSE function in a query. I can use up to 28 values with no problem, but when I add the 29th value,I get the message "The expression you entered is too complex". I thought the limit was something like 256 values but I'm thinking I'm at the max with 28. I've received this same message when I try to nest too many IIF statements. Any suggestions?
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    If you are using that many choose options it sounds like you might benefit from using a sub-query or vba code. Without more details on what you are trying to accomplish and how, we can't really provide any more usefull help.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      My suggestion would be to put the choices into a table when they get to more than three or four. Benefits are that the design is much clearer and the execution is much quicker. A natural follow-on from the first point is that it's easier to maintain in the longer term too.

      Using Choose() rather than IIf() is a good sign that you're thinking about what you do mind.

      Comment

      Working...