create an xml file

csharpcoder

New member
Local time
Today, 00:29
Joined
Oct 5, 2010
Messages
2
I created an VB.NET form to create an xml file, however, it needed to be done in VBA so it would work from an Access form.

Due to I can't copy and paiste my vb.net code to access, how can I create my XML file from MS Access?

I need to call a query within my access db, and take those results and generate an xml file something like this

<Report>
<salesdate></salesdate>
<salesman>
<name></name>
<date></date>
</salesman>
</Report>

and so on, how can I accomplish this using VBA within ms access 07
 
VB.Net Code should work in Access, you will need to modify it though.
 
You could also consider turning your VB.net code into a dll file and calling that from your access application.
 
There is also some method of manipulating Microsoft Office applications from VB.Net. I can’t recall any details but it may be worth looking into.
 
the thing i'm running into is the XMLTextWriter i'm using in the vb.net form, what would that object be in VBA? R
 
If you have made some VB.Net code then that will never work by just copying and pasting into VBA - The language is different and Access cannot read the .NET libraries it relies on.

You options there would be to expose certain methods or functions of the VB.net code and make it into a COM compliant .dll which could be registered and then used by Access and VBA.
 

Users who are viewing this thread

Back
Top Bottom