title: Microsoft Access 2007 and 2010: "Run-Time Error '429': ActiveX component can't create object"
body: <p>I am trying to fix a Microsoft Access database that was imported from Access 97 format to Access 2007 format (.mdb to .accdb). The import was successful and I was able to make the database fully functional from my machine. It is also fully functional from my coworker's machine. However, when taken to another building that is part of our organization, we cannot get the database to run. We know that part of the problem is within opening a connection to the web server that holds the central database (there are several copies of this Access database that consist of the same code, but different data is input into them and uploaded to this central database). Here is the code.</p>
  
  <pre><code>Public Function updateSqlServer(TransType As String, SqlCommand As Variant) As Boolean
  
  
      Dim xmldom As New MSXML2.DOMDocument40
      Dim xmlhttp As New MSXML2.ServerXMLHTTP40
  
      Const SoapServer = "http://www.example.com/webservice.asp"
  
     'setup the XMLHTTP object and POST envelope to SoapServer
      toResolve = 5 * 1000
      toConnect = 5 * 1000
      toSend = 15 * 1000
      toReceive = 15 * 1000
  
      xmlhttp.setTimeouts toResolve, toConnect, toSend, toReceive
      xmlhttp.Open "POST", SoapServer, False  'YIELDS Run-Time Error 429 on this line: xmlhttp.Open
      xmlhttp.setRequestHeader "Man", POST &amp; " " &amp; SoapServer &amp; " HTTP/1.1"
      xmlhttp.setRequestHeader "MessageType", "CALL"
      xmlhttp.setRequestHeader "Content-Type", "text/xml"
  
      xmlhttp.send (SoapEnvelope)
  
     'synchronous wait for response; HTTP status other than 200 (OK) is an error
      If xmlhttp.Status = 200 Then
          Set xmldom = xmlhttp.responseXML 'get response into XML DOM document
          Debug.Print (xmldom.xml)         'write soap response to screen
          updateSqlServer = True
      Else
          'handle error
          Debug.Print ("Didn't Work")
          Debug.Print ("status=" &amp; xmlhttp.Status) 'write soap return code
          Debug.Print ("" &amp; xmlhttp.statusText)    'write status text
          updateSqlServer = False
      End If
  
      Set xmlhttp = Nothing
      Set xmldom = Nothing
  
  
  End Function
  </code></pre>
  
  <p>Things we have tried to fix this problem:
  1. Added all necessary references (Ex. Microsoft XML)
  2. Editing the permissions of the file and the folders
  3. Registering ActiveX Controls
  4. Made sure all options that can be changed match on both working and non-working machines</p>
  
  <p>This old and is not my code or design. I just have to fix it. 
  Any help will be appreciated. </p>