Finally I can send the code!
Public Function Runner()
fPullMeta "IP", "20000", 13
End Function
Public Sub fPullMeta(sIP As String, sPort As String, sSource As String)
'This function takes in an ip,port,a source numeric, and a volume numeric. It queries idol and places the metadata into the DOCUMENT table.
Dim xmldoc As DOMDocument
Set xmldoc = New DOMDocument
xmldoc.async = False
xmldoc.validateOnParse = False
Dim Query As String
Query = "http://" & sIP & ":" & sPort & "/action=query&anylanguage=true&print=fields&printfields=UUID,AUN_PRODUCTION_VOLUME_NUMERIC&DATABASEMATCH=" & sSource & "&fieldtext=EXISTS{}:AUN_PRODUCTION_VOLUME_NUMERIC&SORT=ALPHABETICAL:UUID"
xmldoc.Load (Query)
ParseXML xmldoc
Next
End Sub
Public Sub ParseXML(xmldoc As DOMDocument)
Dim doc As IXMLDOMNodeList
'Goes through the results of IDOL, looks for specific values, and copies those values into the IDOLRESULTS table.
Set doc = xmldoc.getElementsByTagName("DOCUMENT")
Dim entry, child As IXMLDOMNode
Dim children As Recordset
Set children = CurrentDb.OpenRecordset("IdolResults")
Dim UUID As String
Dim VolID As Long
VolID = 0
For Each entry In doc
For Each child In entry.childNodes
If (child.nodeName = "UUID") Then
UUID = child.Text
ElseIf (child.nodeName = "AUN_PRODUCTION_VOLUME_NUMERIC") Then
If child.Text > VolID Then
VolID = child.Text
End If
End If
children.AddNew
children(0) = UUID
children(1) = VolID
children.Update
Next
Next
children.Close
End Sub