Hi, not sure if this is a Query question or a VBA one. I am trying to export query data to an xml file but using one of the columns as an attribute. So for example, I am trying to query data from my inventory table and I would like my Material code to be my attribute so I have some sort of indexing capability in my xml file. I would like to export this using vba and the Application.ExportXML tool.
So I currently get:
<QueryName>
What I am trying to accomplish within Access is:
<QueryName>
The goal is to export this xml file using vba
Any help with this would be greatly appreciated.
So I currently get:
<QueryName>
<MaterialCode>1234</MaterialCode>
<Descritption>Something</Description>
<SupplierCode>35</SupplierCode>
<Category>8</Category>
</QueryName>What I am trying to accomplish within Access is:
<QueryName>
<Inventory MaterialCode="1234">
<Descritption>Something</Description>
<SupplierCode>35</SupplierCode>
<Category>8</Category>
</Inventory>
</QueryName>The goal is to export this xml file using vba
Code:
Application.ExportXML acExportQuery, "QueryName", "C:\FolderName\SubFolder\" & "FileName_" & Format(Now(), "yyyymmdd") & ".xml", WhereCondition:="Category=8"
Any help with this would be greatly appreciated.