title: MSAccess 2010 VBA Open a read-only database
body: <p>I have a MSAccess database that I'm trying to pull archived data into, from other MSAccess databases that live in read-only folders.
  So ...</p>
  
  <pre><code>Dim aidbx As DAO.Database
  Dim stDB as STring
   stDB = 'path to read-only database
  ...
  Set aidbx = OpenDatabase(stDB, False, True)
  </code></pre>
  
  <p>So it craters right there, even though the 'True' is telling it to open the database read-only.  I get the 'Run time error 3050 - could not lock file' error message.</p>
  
  <p>What am I doing wrong?</p>