Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Only Error Message

Status
Not open for further replies.

tjherman

Programmer
Jun 19, 2006
68
US
I'm using the TransferText function to export a table from Access into Excel. If I export the file as a .txt or a .csv, it works fine; however when I try to export the file as an .XLS, I get a run-time error of 3027 -- "Cannot update. Database or object is read-only."

Here's the code:

DoCmd.TransferText acExportDelim, , "tmpAssociateCharges", "C:\Associate.xls", True
 
sorry for suggesting the obvious, but is associate.xls open in excel at the time?

Excel and Word tend to lock files that are open where .txt files are much more accessable even when open in the wonder application, notepad.

Apologies again for suggesting something so obvious but sometimes these things are the easiest to overlook!

JB
 
Take a look at the TransferSpreadsheet function if you are trying to create a spreadsheet directly from Access.
 
No, the file isn't open. I'm even deleting the file if it exists first.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top