Feb 23 2012, 03:23 PM
I'm trying to import/merge/update a table from an xml file.
To import I'm using the following code:
This works perfectly to import new records, however what I also need it to do is merge/update the data. So the xml file will contain the correct data and any amendments need to be made to the Access table.
Any help greatly appreciated.
PS I'm using Access 2010
Feb 23 2012, 04:11 PM
I would import the file to a temp table, then run an Update query that links the two and an Append query.
Feb 23 2012, 05:01 PM
Thanks for the reply.
That sounds like the sort of way to go.
With the temp table can Access be set to create it then delete it? As this import needs to be carried out regularly.
Feb 24 2012, 07:55 AM
Sure, You can use DoCmd.DeleteObject.
And then use a MakeTable query to create it. But if the structure will always be the same, it may be better to leave the table and delete all records before the Append.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here