title: Upsize Access Backend To SQL Server - Query Issues
body: <p>I'm completely new to the SQL Server portion of databases.  I've created a split Access database that functions well.</p>
  
  <p>As a test I upsized the tables to SQL server.  For the most part everything went smoothly; however, two of my queries are no longer working.  They are both fairly complex union queries.  I believe the union is the culprit to my issues.</p>
  
  <p>With the first one I have two queries using union all.  They work individually, but when I use the union query I receive the error "object invalid or no longer set".</p>
  
  <p>With the second one I have 3 queries with union all.  These are simpler than the first case.  This time I receive the error "The expression is typed incorrectly, or it is too complex to be evaluated."</p>
  
  <p>Is there something specific about union queries with tables on SQL server?  Any help or advice is appreciated.</p>
  
  <pre><code>SELECT scrap.coilnum, Sum(scrap.lnff) AS sumoflnff, scrap.code, scrap.location
  FROM scrap
  WHERE scrap.day&gt;=[Forms]![coilparameters]![Text0] And scrap.day&lt;=[Forms]![coilparameters]![Text2] and scrap.productionline=[Forms]![coilparameters]![combo4] and scrap.coilnum&lt;&gt;0
  GROUP BY scrap.coilnum, scrap.code, scrap.location;
  union all
  SELECT sawscrap.tcoilnum, Sum(sawscrap.length) AS sumoflnff, sawscrap.code, sawscrap.location
  FROM sawscrap
  WHERE sawscrap.day&gt;=[Forms]![coilparameters]![text0] And sawscrap.day&lt;=[Forms]![coilparameters]![text2] and sawscrap.productionline=[Forms]![coilparameters]![combo4] and sawscrap.tcoilnum is not null and sawscrap.tcoilnum&lt;&gt;0
  GROUP BY sawscrap.tcoilnum, sawscrap.code, sawscrap.location;
  UNION ALL
  SELECT sawscrap.bcoilnum, Sum(sawscrap.length) AS sumoflnff, sawScrap.code, sawscrap.location
  FROM sawscrap
  WHERE sawscrap.day&gt;=[Forms]![coilparameters]![text0] And sawscrap.day&lt;=[Forms]![coilparameters]![text2] and sawscrap.productionline=[Forms]![coilparameters]![combo4] and sawscrap.bcoilnum is not null and sawscrap.bcoilnum&lt;&gt;0
  GROUP BY sawscrap.bcoilnum, sawscrap.code, sawscrap.location;
  </code></pre>
  
  <p>There is the second one.</p>