title: MS Access 2010 Run-Time Error '2467'
body: <p>I have a MS Access 2010 application that is linked to MS SQL 2008 in the back end.</p>
  
  <p>When I run the application, I encounter a run-time error '2467' - The expression you entered refers to an object that is closed or doesn't exists.</p>
  
  <p>When I select Debug, the line points to:</p>
  
  <p>Forms!FRM_MAIN_HOME!FRM_SUB_EDIT.Form.RecordSource = </p>
  
  <p>I've run the query in the SSMS and works fine.</p>
  
  <p>I've looked for missing references, and there aren't any.</p>
  
  <p>When I run the application with Shift to present the forms, I get a different error: Data Type mismatch in criteria expression. This time  I don't have a debug option, but I suspect that this is the real issue.</p>
  
  <p>One more thing: when I run this application on a different database, it loads with no errors.</p>
  
  <p>Any help is much appreciated.</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <pre><code>Forms!FRM_MAIN_HOME!FRM_SUB_EDIT.Form.RecordSource = _
     "SELECT V.VendorNumber, V.VendorName, T.DocumentNumber, " _
     &amp; "T.DocumentDate, T.AmountInc, T.GSTClaim, T.GSTBatch " _
     &amp; "FROM TBL_VENDOR_MASTER AS V INNER JOIN TBL_GST_01_TRANSACTIONS AS T " _ 
     &amp; "ON V.AAVendorID = T.AAVendorID WHERE T.GSTBatch =" _
     &amp; Me.BATCH_NUM &amp; " ORDER BY V.VendorName" 
  </code></pre>
  
  <p>When I run this code in the SSMS, it works just fine. Also, when I select a different database, it works without any errors.</p>