Automate Access Import Using TransferText Method

S

Steve Murphy

I'm trying to automate an import into an Access database using VBA and the
DoCmd.TransferText method, but I am receiving the following error:

Run-time error '3027'
Cannot update. Database or object is read only.

Although I'm calling the method from a module within the actual Access
database, I've also tried opening it with OpenDatabase to no avail. I am,
however, able to perform individual imports using the stored import
specifications.

What am I doing wrong?
 
D

david epsom dot com dot au

You probably have a problem with the file extension.
By default, only certain file extensions (.txt .csv ...)
are accepted.

Note, TransferText is just an Append or Create Table
query. You can specify the text file as a source table
in an ordinary Append or Create Table query.

(david)
 
S

Steve Murphy

You probably have a problem with the file extension.
By default, only certain file extensions (.txt .csv ...)
are accepted.


David, thank you for the reply. When I double checked my code, I realized
that I didn't have the file name entered correctly. It's working now.

Thanks again.
 

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

Top