Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Object Required on XML Code

Avatar of Susanstevenson
Susanstevenson asked on
VB Script
3 Comments1 Solution903 ViewsLast Modified:
Hi There,

I have some code below which is coming back with Object required on the Set objHttp lline.  (I am using Ms Access 2007).  It says "Object Required"

My experience with xml is limited - the machine on which I am working has soap toolkit on it.

Dim strUrl
      Dim objHttp
      Dim rst

      'Build the url
      strUrl = "http://????????????????????????????????????????????????"
      strUrl = strUrl & "&Key=" & "????-????-????-????"
      strUrl = strUrl & "&Id=" & (Me.lkupAddressList.Column(2, lkupAddressList.ItemsSelected(0)))
      strUrl = strUrl & "&PreferredLanguage=" & "English"
      strUrl = strUrl & "&UserName=" & "??????"

      'Make the request
      Set objHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") '- code breaks here...
      objHttp.Open "GET", strUrl, False

      'Create the recordset
      Set rst = Server.CreateObject("ADODB.Recordset")
      rst.Open objHttp.ResponseStream

      'Check for an error
      If rst.Fields.Count = 4 Then
         If rst.Fields(0).Name = "Error" Then
           Err.Raise rst.Fields(0), "Webservice Error", rst.Fields(1)
        End If
      End If

      'Return the recordset
      Set AddressFields = rst

      'FYI: The recordset returns the following columns: