title: Query is too Complex? Using an append query
body: <p>I have been using this append query for days and it randomly throws this exception:</p>
  
  <blockquote>
    <p>Query is too Complex</p>
  </blockquote>
  
  <p>The query inserts into a different table the data retrieved back from a union query. </p>
  
  <pre><code>INSERT INTO [CA-SSI Dispatch]
  SELECT 
  SSIQuery.[Phonenumber] AS Phonenumber, 
  SSIQuery.[FormRecordNumber] AS FormRecordNumber, 
  SSIQuery.[InspectedBY] AS InspectedBY, 
  SSIQuery.[Project] AS Project, 
  SSIQuery.[DateTimeInspection] AS DateTimeInspection, 
  SSIQuery.[Question] AS Question, 
  SSIQuery.[Answer] AS Answer, 
  SSIQuery.[Rank] AS Rank, 
  SSIQuery.[Comment] AS Comment, 
  SSIQuery.[Regulation] AS Regulation
  FROM SSIQuery
  
  WHERE NOT EXISTS    
  (SELECT *    FROM [CA-SSI Dispatch]    WHERE   SSIQuery.[Phonenumber] = [CA-SSI Dispatch].[Phonenumber]    
  AND   SSIQuery.[FormRecordNumber] =[CA-SSI Dispatch].[FormRecordNumber]    
  AND   SSIQuery.[Project] = [CA-SSI Dispatch].[Project]   
  AND   SSIQuery.[DateTimeInspection] = [CA-SSI Dispatch].[DateTimeInspection] 
  AND SSIQuery.[Question] = [CA-SSI Dispatch].[Question] 
  AND SSIQuery.[Answer] = [CA-SSI Dispatch].[Answer]
  AND SSIQuery.[FormRecordNumber] = [CA-SSI Dispatch].[FormRecordNumber]);
  </code></pre>
  
  <p>The INSERT INTO stopped working and kept returning that error after I added more fields to my union query.  If it helps this is part of my union query. This UNION QUERY, continues to work.</p>
  
  <pre><code>SELECT
  SSIAns.phonenumber AS Phonenumber,
  SSIAns.Form_Record_Number As FormRecordNumber,
  SSIAns.Inspected_By AS InspectedBY,
  SSIAns.Project,
  SSIAns.Date_Time_of_Inspection AS DateTimeInspection,
  QR.q1 AS Question,
  SSIAns.Clean_level_ground AS Answer,
  SSIRank.Rank_1 AS Rank,
  SSIComment.Comment_1 AS Comment,
  QR.r1 AS Regulation
  
  FROM SSIAns, SSIRank,SSIComment, QR
  
  WHERE 
  SSIRank.Rank_1 = "2_Address_Within_3_Days" AND 
  SSIAns.Form_Record_Number=SSIRank.Form_Record_Number 
  AND SSIRank.Form_Record_Number =SSIComment.Form_Record_Number
  
  UNION 
  SELECT
  SSIAns.phonenumber AS Phonenumber,
  SSIAns.Form_Record_Number As FormRecordNumber,
  SSIAns.Inspected_By AS InspectedBY,
  SSIAns.Project,
  SSIAns.Date_Time_of_Inspection AS DateTimeInspection,
  QR.q2 AS Question,
  SSIAns.Adequate_ramps_barricading AS Answer,
  SSIRank.Rank_2 AS Rank,
  SSIComment.Comment_2 AS Comment,
  QR.r1 AS Regulation
  
  FROM SSIAns, SSIRank,SSIComment, QR
  
  WHERE 
  SSIRank.Rank_2 = "2_Address_Within_3_Days" AND 
  SSIAns.Form_Record_Number=SSIRank.Form_Record_Number 
  AND SSIRank.Form_Record_Number =SSIComment.Form_Record_Number
  </code></pre>
  
  <p>The union query goes on over and over with the next corresponding fields. Ex: rank_3, rank_4 etc</p>
  
  <p>Both queries were working fine until I added up til the 50th</p>
  
  <pre><code>UNION 
  SELECT
  SSIAns.phonenumber AS Phonenumber,
  SSIAns.Form_Record_Number As FormRecordNumber,
  SSIAns.Inspected_By AS InspectedBY,
  SSIAns.Project,
  SSIAns.Date_Time_of_Inspection AS DateTimeInspection,
  QR.q2 AS Question,
  SSIAns.Adequate_ramps_barricading AS Answer,
  SSIRank.Rank_50 AS Rank,
  SSIComment.Comment_50 AS Comment,
  QR.r1 AS Regulation
  
  FROM SSIAns, SSIRank,SSIComment, QR
  
  WHERE 
  SSIRank.Rank_50 = "2_Address_Within_3_Days" AND 
  SSIAns.Form_Record_Number=SSIRank.Form_Record_Number 
  AND SSIRank.Form_Record_Number =SSIComment.Form_Record_Number
  </code></pre>
  
  <p>Now, only the union query works, when I try to run the INSERT INTO query, to insert into a secondary table, I run the error "Query is too Complex"
  With the union query, we're trying to break down the question to corresponding answer, rank &amp; comment, into one record. So question 1 &amp; corresponding fields is one record. Question 2 &amp; corresponding fields is a different record. </p>