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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with TransferText method

Status
Not open for further replies.

metaltree

Technical User
Nov 27, 2006
28
CA
Every time I try the following command:

DoCmd.TransferText acExportDelim, "format_w_tab_header", "query123", "C:\aaa",-1

VBA tells me "Execution error 3027: update impossible, database or object is read-only."

Still, the "query123" object is not a read-only one.

Any clues?

Thanks!
 
Do you perchance have a folder called "C:\aaa"?

If you do then it is attempting to export to a folder and that is indeed impossible.
 
No, there's no such folder named "C:\aaa".

I changed the name for "C:\aaa.txt" and it doesn't work either.

 
Do you have the right permissions to create a file in the C: drive ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes, I have that right.

I also tried on another drive, and it does the same.

When I put the .txt extension, here is what it says:

Execution error '3011':

Microsoft Jet database engine could not find the object 'aaa#txt'. Make sure that this object exists and that you correctly spelled its name and path.
 
Okay, I solved the problem.

The Specification Name ("format_w_tab_header") must contain the same field names or types that the object (table or query) contains, otherwise it fails.

Thanks to you all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top