DataTrain
asked on
Using Access VBA to write table data to an XML file
I want to click a button in Access and output a Table (or data from a Query) to an XML file. I have tried successfully doing this via the GUI but I need to do it in VBA. This would need to work in 2003 as well as 2007. I will also need to EITHER specify san existing XML file and location OR create a new XML file in a specific location. A brief code example would be really helpful. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works OK. Thanks.
Glad I could be of assistance! :-)
I take it you managed to work out how to check for an existing XML file/location then?
I take it you managed to work out how to check for an existing XML file/location then?
ASKER
No actaully! I am just looking at the feasability of doing some work involving XML which I have never used before. I would need to get into the details of the code but I was just trying to get a feel for how easy it is to export some tables. However, any other hints you may want to offer will be greatfully received!
You can use the Dir() function to test whether a given file/directory exists - hope that helps! :-)
ASKER
This is a very long short - but I had a friend living in London called James Walters. In the unlikely event that was you, you would know where "The Freddy" was! Anyway, this isn't lost friends, so thanks for your help.
No relation, I'm afraid! :-)
If you supply a sample database, I'd be happy to show you how to do this.