[AccessD] ExportXML CreateAdditional Data Named Argument Error

Bud Goss bgoss711 at ameritech.net
Wed Jul 14 23:41:29 CDT 2010


I am attempting to generate a fairly complex .xml file with Access 2003
 
The code listed below is from a Microsoft support article as an example of the ExportXLM method AdditionalData Object for use with the Northwind database
 
Problem is that it will not compile - gives a Named Argument Not Found on line:
objAD(Item:="Order Details").Add "Order Details Details"

( Probably an typo error on above line
objAD(Item:="Order Details").Add "Order  Details" gives same error)
 
This same question/problem was posted to MSDN a while back but - I could find any posted.answer.
 
Can anyone tell me how to fix this error?
 
 
 Private Sub ExportRelTables()
   ' Purpose: Exports the Orders table as well as
   ' a number of related database to an XML file.
   ' XSD and XSL files are also created.
   Dim objAD As AdditionalData
   ' Create the AdditionalData object.
   Set objAD = Application.CreateAdditionalData
   ' Add the related tables to the object.
   With objAD
      .Add "Order Details"
      objAD(Item:="Order Details").Add "Order Details Details"
      .Add "Customers"
      .Add "Shippers"
      .Add "Employees"
      .Add "Products"
      objAD(Item:="Products").Add "Product Details"
      objAD(Item:="Products")(Item:="Product Details").Add _
         "Product Details Details"
      .Add "Suppliers"
      .Add "Categories"
   End With
   Application.ExportXML acExportTable, "Orders", _
       "C:\Orders.xml", "C:\OrdersSchema.xsd", _
       "C:\OrdersStyle.xsl", AdditionalData:=objAD
End Sub



More information about the AccessD mailing list