Bud Goss
bgoss711 at ameritech.net
Thu Jul 15 11:21:05 CDT 2010
Tannks for the reply Darryl. I may have to go that route or use some other non Access tool. But it would be better if I could use standard Access VBA code. My application requirements has a number of related tables. The code shown below would seem to have a high proability of being a good fit - if it would work. Bud I might be off target here, but MZ Tools will generate an XML export. Would that work for you? Regards Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bud Goss Sent: Thursday, 15 July 2010 2:41 PM To: accessd at databaseadvisors.com Subject: [AccessD] ExportXML CreateAdditional Data Named Argument Error 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