title: application run method "error application-defined or object-defined error"
body: <p>I'm trying to run a sub for access using the <code>Access.application.run</code> method. It keeps on bringing up error: </p>
  
  <blockquote>
    <p>40351 "error application-defined or object-defined error"</p>
  </blockquote>
  
  <p>The code is very basic:</p>
  
  <pre><code>Dim objAccess, wsh As Object
  
  Set wsh = VBA.CreateObject("WScript.Shell")
  Set objAccess = CreateObject("Access.Application")
  
  With objAccess
  .OpenCurrentDatabase ("c:\coxi\Documents\Personnal\investment\5334_2.accdb")
  .Run "test"    
  Set .CurrentProject = Nothing
  End With
  </code></pre>
  
  <p>the routine errors on the <code>.run</code> line</p>