title: trying to create table from existing table (Structure only)
body: <pre><code>Set objAccess = CreateObject("Access.Application")
  objAccess.DoCmd.rename "new_", 0, "new"
  </code></pre>
  
  <p>Here it renames the <code>new</code> to <code>new_</code> which works fine and renames successfully</p>
  
  <pre><code>Curmonth1  = [new]
  Curmonth2  = [new_]
  
  objAccess.DoCmd.RunSQL "SELECT * INTO" &amp; Curmonth1 &amp; "FROM" &amp; Curmonth2 &amp; "WHERE 1 = 2"
  </code></pre>
  
  <p>This query is working fine sometimes and throwing below error sometimes
  runtime error 2501 the run command action was cancelled.<br>
  As I'm passing 2 variables into the query in VBA when working with Access DB</p>
  
  <p>Tried with this query too</p>
  
  <pre><code>objAccess.DoCmd.RunSQL "CREATE TABLE" &amp; Curmonth1 &amp; "AS SELECT * FROM" &amp; Curmonth2 &amp; "WHERE 1 = 2"
  </code></pre>
  
  <p>this doesn't works at all.</p>
  
  <p>Help me out. any other queries which can work.<br>
  I feel some database refresh should be done in between those 2queries.</p>