Library Reference/Object Variable Set Problem (1 Viewer)

muskilh

Registered User.
Local time
Today, 17:36
Joined
Jun 8, 2009
Messages
14
Hi,

I am having a weird problem with my VB code in Access 2003. I made a module which parses through an XML file.
I added these 2 references: Microsoft XML v6.0 (msxml6.dll) and Microsoft XML, version 2.0 (msxml.dll)

I wrote the code, and everything was working fine.
I moved the Database to another computer, made practically no changes (and definately no changes involved with this section of the code). Moved the Database back to my computer, tried to run it and recieved this error:
Code:
"Object variable or With block variable not set"
on the last line of code here:
Code:
    Dim xmlDoc As DOMDocument
    Dim custList As IXMLDOMNodeList
    Dim cust As IXMLDOMNode
    Dim rstCustomerTable As DAO.Recordset
    Dim rstAddressGenerators As DAO.Recordset
 
    Set rstCustomerTable = CurrentDb.OpenRecordset(strCustomerTable, dbOpenDynaset)
    Set rstAddressGenerators = CurrentDb.OpenRecordset(strAddressTable, dbOpenDynaset)
 
    Set xmlDoc = New DOMDocument
 
    xmlDoc.Load strPathToXML
 
    [COLOR=red]Set custList = xmlDoc.documentElement.selectNodes("customer")[/COLOR]

I recieved this same error on this same line when I first wrote the code but I was able to solve the problem by adding the 2 references. Now, these 2 references are still there but I'm getting the error again!

Does anyone have any idea of what could have went wrong and how i can fix it?!

Thank You for your help,
--Muskilh
 

ajetrumpet

Banned
Local time
Today, 16:36
Joined
Jun 22, 2007
Messages
5,638
i have no experience working with dynamic object models in a Microsoft language, but in other languages, yes, so no help for ya there. but...have you by chance ever seen the phrase "MISSING:" preceed a library in your reference lists? i have seen it a few times, and all be dogged if i can figure out what it's about. every time it has happened to me, i simply unchecked the so-called "missing" ones and the application runs just fine. :confused:
 

muskilh

Registered User.
Local time
Today, 17:36
Joined
Jun 8, 2009
Messages
14
Yeah, I saw the "MISSING:..." one, and unclicked it when I got the error again; I forgot which library it was for.

It didn't solve anything :(
 

Users who are viewing this thread

Top Bottom