By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,587 Members | 1,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,587 IT Pros & Developers. It's quick & easy.

Exporting a table to a Tab delimeted Text File via code

P: n/a
I am trying to use the DoCmd.TransferText method to export an access table
to
a Tab Delimited Text File. I have put the code behind the onclick event of
a button
and keep getting the error "Run-time error '32027': Cannot update. Database
or object is read-only"

Code I using is:

Private Sub ExportButton_Click()
DoCmd.TransferText acExportDelim, , "TableName", "c:\export.txt"
End Sub

Am I missing something?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Your code works fine in exporting a text file with comma and double quote
delimiters. Try checking your table for field values containing commas or
double quotes. Check to see if the text file you are writing already exists
and is read-only. You might try prefacing your docmd line with one that
checks for the text file and deletes it, before executing the export
operation.
nunYa<nu***@yourmomma.com> Friday, March 18, 2005 >>>

I am trying to use the DoCmd.TransferText method to export an access table
to
a Tab Delimited Text File. I have put the code behind the onclick event of
a button
and keep getting the error "Run-time error '32027': Cannot update. Database
or object is read-only"

Code I using is:

Private Sub ExportButton_Click()
DoCmd.TransferText acExportDelim, , "TableName", "c:\export.txt"
End Sub

Am I missing something?


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.