xml export error

F

Frank

Hello!

When I execute this -

DoCmd.TransferText acExportHTML, , "tblCOTClaim", "C:\temp\COTClaim.xml", True

I get -

Runtime Error '3027' Cannot update. Database or object is read-only.

Can anyone please tell me what I am doing wrong?

Thanks in anticipation!
 
D

Douglas J. Steele

Try using a different extension (try .txt). If that works, you can always
rename the file:

DoCmd.TransferText acExportHTML, , "tblCOTClaim", "C:\temp\COTClaim.txt",
True
Name "C:\temp\COTClaim.txt" As "C:\temp\COTClaim.xml"
 
F

Frank

Yes ... that worked (but I don't understand why?) ... Thank you ... the
resulting file is marked-up in html ... I need to write an xml formatted file
.... I can do so from the File > Export menu ... can I do so through code? ...
Regards ...
 
F

Frank

OK ... I see ... Thank you ... Are you able to help with my question about
exporting in XML format using VB4A (I now realise I'll have to give the file
a .txt extention and then change it after)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top