I have an access db with 3 tables: Customer, Order, Detail. These three tables are linked via a field calls customerID. I would like to export these three tables to xml but I do not want to export the field "customerID " from the table Order and table Detail.
somehow this code only export out tables customer and table Order but not table Detail. In addition, I do not know how to code so that only certain fields from tables Order and table Detail to be exported because I do not want export CustomerID field from table Order and table Detail
could someone please help?
thanks,
bonzai
Code:
Sub ExportCustomerOrderData()
Dim objOrder As AdditionalData
Dim objDetail As AdditionalData
Set objOrder = Application.CreateAdditionalData
Set objDetail = Application.CreateAdditionalData
Set objOrder = objOrder.Add("Order")
Set objDetail = objDetail.Add ("Detail")
Application.ExportXML
ObjectType:=acExportTable, _
DataSource:="C:\Customer", _
DataTarget:="Customer Orders.xml", _
AdditionalData:=objOrder, _
AdditionalData:=objDetail
End Sub
could someone please help?
thanks,
bonzai
Comment