I am working on an access form that browses for an xml file and then imports it into a table. I have the browse button complete using VBA, but i am not sure how to write the code to import the XML file into the table. I would like to import this xml file into a table called "data", and have it create fields for the fields on the XML file. Here's my code for the browse button if that is any help. Im not sure how to go about adding the xml file to the table using vba.
Option Compare Database
Public Function GetFile() As Variant
Dim dialog As Object
Dim pickedfile As Boolean
Set dialog = Application.FileDialog(3)
GetFile = Null
.AllowMultiSelect = False
.Title = "Please select file for import"
.Filters.Add "XML Files", "*.XML"
pickedfile = False
pickedfile = .Show
If pickedfile Then
GetFile = .SelectedItems.Item(1)