Results 1 to 2 of 2
  1. #1
    wp1 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    4

    "The expression you entered is too complex"

    I have 20 numbers I am trying to isolate so I built the following and it gives me the "too complex" message.


    Would you have a better idea on how to run this query? Thanks a lot.
    wp

    DVT_Eligible: IIf(tbl_NextGen_Working_Table!CPT4="99221",1,IIf(t bl_NextGen_Working_Table!CPT4="99222",1,IIf(tbl_Ne xtGen_Working_Table!CPT4="99223",1,IIf(tbl_NextGen _Working_Table!CPT4="99218",1,IIf(tbl_NextGen_Work ing_Table!CPT4="99219",1,IIf(tbl_NextGen_Working_T able!CPT4="99220",1,IIf(tbl_NextGen_Working_Table! CPT4="99231",1,IIf(tbl_NextGen_Working_Table!CPT4= "99232",1,IIf(tbl_NextGen_Working_Table!CPT4="9923 3",1,IIf(tbl_NextGen_Working_Table!CPT4="99234",1, IIf(tbl_NextGen_Working_Table!CPT4="99235",1,IIf(t bl_NextGen_Working_Table!CPT4="99236",1,IIf(tbl_Ne xtGen_Working_Table!CPT4="99238",1,IIf(tbl_NextGen _Working_Table!CPT4="99239",1,IIf(tbl_NextGen_Work ing_Table!CPT4="99281",1,IIf(tbl_NextGen_Working_T able!CPT4="99282",1,IIf(tbl_NextGen_Working_Table! CPT4="99283",1,IIf(tbl_NextGen_Working_Table!CPT4= "99284",1,IIf(tbl_NextGen_Working_Table!CPT4="9928 5",1,IIf(tbl_NextGen_Working_Table!CPT4="99291",1, 0))))))))))))))))))))

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The Switch() function would be simpler. You might also consider a table with the 20 numbers and joining it in your query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Expression too complex to Evaluate
    By cbh35711 in forum Access
    Replies: 4
    Last Post: 02-27-2012, 11:06 AM
  2. Replies: 3
    Last Post: 12-30-2011, 12:43 PM
  3. Replies: 13
    Last Post: 12-05-2011, 05:10 AM
  4. Replies: 3
    Last Post: 03-31-2011, 11:07 AM
  5. need help, expression is too complex?
    By ice673 in forum Queries
    Replies: 5
    Last Post: 02-15-2010, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums