title: Calling Access Report from VS 2013 Express Throws ActiveX Error
body: <p>I have a VS 2013 Express system that uses an Access db.  After populating the db with values, I open a report object created in Access.  This all worked perfectly approximately 1 year ago.  Now, in development or production, trying to open the report throws an error.</p>
  
  <p>The code behind the form is:</p>
  
  <pre><code>Imports Access = Microsoft.Office.Interop.Access
  
  Public Class frmReports
  
      Public db_path As String
  
      Dim oAccess As Access.application
  </code></pre>
  
  <p>And the code behind the button that opens the report is:</p>
  
  <pre><code>Private Sub btnSumByPlan_Click(sender As Object, e As EventArgs) Handles btnSumByPlan.Click
  
      oAccess = CreateObject("Access.Application")
      oAccess.visible = True
      oAccess.opencurrentdatabase(db_path)
      oAccess.docmd.openreport(ReportName:="rptSumByPlan", view:=Access.AcView.acViewPreview)
  
  End Sub
  </code></pre>
  
  <p>However the code fails on the CreateObject line with the following error:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll.</p>
    
    <p>Additional information:  Cannot create ActiveX component.</p>
  </blockquote>
  
  <p>I have the following COM references selected:</p>
  
  <ul>
  <li>Microsoft Access 12.0 Object Library</li>
  <li>Microsoft ActiveX Data Objects 2.8 Library</li>
  <li>Microsoft Office 12.0 Object Library</li>
  <li>Microsoft Visual Basic for Applications Extensibility 5.3</li>
  </ul>
  
  <p>I have tried selecting different versions of the Access, Office and ActiveX libraries but still get the same error.</p>
  
  <p>I'm not positive, but I think I was running Office 2010 a year ago and now Office 2013.</p>
  
  <p>Can you tell me what I'm doing wrong?</p>
  
  <p>Thanks in advance.</p>