title: How to correct for inability to load DAO DLL in Access 2003 on Windows 7?
body: <p>I have an application that uses the MS Access 2003 front end to connect to both a MS SQL and a Sybase database. This application uses VBA (Visual Basic 6) and this cannot be changed. We are in the midst of a conversion from Windows XP (where the application runs fine) to Windows 7. </p>
  
  <p>On Windows 7, attempts to connect to the Sybase databsae fail. The application uses a pass through query and when the failure occurs, I receive the following message: </p>
  
  <pre><code>An unexpected error occurred in Call_SP.
  Error number: 48
  Error description: Error in loading DLL
  Error source: Secure open security
  </code></pre>
  
  <p>The particular line of code where this is throwing the error is:</p>
  
  <pre><code>For Each qryDef In dbLocal.QueryDefs
  </code></pre>
  
  <p>The items in this line of code are defined like this:</p>
  
  <pre><code>Dim dbLocal As Database
  Dim qryDef As QueryDef
  
  Set dbLocal = CurrentDb()
  </code></pre>
  
  <p>When originally launching the application, there was a missing reference for Microsoft DAO 3.6 Object Library. I copied the dao360.dll file to C:\Program Files (x86)\Common Files\Microsoft Shared\DAO, registered it using regsvr32.exe, and set the reference (Tools -> References) to this file.</p>
  
  <p>At this point, I suspect the problem may have something to do with user rights on this machine, but I'm stuck on where to start. Users do have "read and execute" rights on the dao360.dll file. </p>
  
  <p>We have a lot of legacy apps written in Access, so our systems use Access 2003, but Word, Excel, and Outlook 2010. We are moving to Windows 7 64-bit.</p>