Originally Posted by
June7
Well, it's working now; here's the code that works, thanks to another source of assistance:
Code:
Private Sub XML_OutSendBtn_Click()
'export query to selected XML file
Dim ExportFileStr As String
Dim objSchedule As AdditionalData
ExportFileStr = XML_PathEdit
Set objSchedule = Application.CreateAdditionalData
If Right(ExportFileStr, 4) <> ".xml" Then
ExportFileStr = ExportFileStr & ".xml"
End If
Set objSchedule = objSchedule.Add("NCOA_MatchTbl")
objSchedule.Add ("attend_schedule")
Application.ExportXML acExportQuery, "AddressUpdateReturn", ExportFileStr, , , , , acEmbedSchema, , objSchedule
End Sub
What was not to me clear from Online Help (and MSDN, which has the same information) was that EVERY TABLE containing data that is to be included must be included in the AdditionalDataObject.Add sequence.
<EDIT> FWIW, XML files are being used in this scenario to transfer data files to & from our site and our client's site(s). XML was selected as a "common" format understood and importable/exportable by the two different systems in use in our respective locations.
Steve