AdditionalData 对象 (Access)

代表由 ExportXML 方法导出的父表中所包含的表和查询的集合。

备注

若要创建一个 AdditionalData 对象,请使用 CreateAdditionalData应用程序 对象的方法。

若要将表添加到现有的 AdditionalData 对象,使用 Add 方法。

示例

下面的示例将 Northwind Traders 示例数据库的 Customers 表格的内容连同 Orders 和 Orders Details 表的内容一起导出到名为 Customer Orders.xml 的 XML 数据文件中。

Sub ExportCustomerOrderData() 
 Dim objOrderInfo As AdditionalData 
 
 Set objOrderInfo = Application.CreateAdditionalData 
 
 ' Add the Orders and Order Details tables to the data to be exported. 
 objOrderInfo.Add "Orders" 
 objOrderInfo.Add "Order Details" 
 
 ' Export the contents of the Customers table. The Orders and Order 
 ' Details tables will be included in the XML file. 
 Application.ExportXML ObjectType:=acExportTable, DataSource:="Customers", _ 
 DataTarget:="Customer Orders.xml", _ 
 AdditionalData:=objOrderInfo 
End Sub

方法

属性

另请参阅

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。