Question : Export individual records to xml

I have a table in Acccess with multiple records. How can I export each record in the table to an xml file? I think what I want is some vba code to loop through the table and export each record to its own xml file. I have no idea where to find something like that. Any help would be appreciated.

Answer : Export individual records to xml

Are they all in the same table? I'm assuming they are.
Here's the bones for you. Let me know if you need more help...

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Dim mySQL as String
Dim myRST as ADODB.Recordset
Dim myXML as String
 
mySQL = "SELECT xmlstring FROM yourtable"
        Set myRST = New ADODB.Recordset
        myRST.Open mySQL, CurrentProject.Connection
            Do While Not myRST.EOF
              'get xml field from your table/query
               myXML = fields("xmlstring") 
 
              'here you need to decide what you're doing with it
              'DoCmd.OutputTo is an option with a bit of work
 
           myRST.MoveNext
           Loop
           myRST.Close
           Set myRST = Nothing
Open in New Window Select All
Random Solutions  
 
programming4us programming4us