Solved: How to export table to a .txt file

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

nursell

Thread Starter
Joined
Jul 26, 2011
Messages
143
Hi,

Im trying to export a table to a .txt file on a network drive when i use a macro to do it i get

"Cannot update object or database read only"

So i tried VBA but can't get the correct syntax. Here is the code i used

DoCmd.TransferText acExportDelim, "DPD", "DPDExportTable", "Y:\Dispatch\Import.txt", False


Hope someone can help me
 
Joined
Jun 8, 2001
Messages
2,583
Are you working from access? If so try removing the "DPD" but leave the commas.

DoCmd.TransferText acExportDelim, , "DPDExportTable", "Y:\Dispatch\Import.txt", False

That field is for a schema specification or something?
 

nursell

Thread Starter
Joined
Jul 26, 2011
Messages
143
Thanks i gave that ago the code ran with no errors but i didnt export the table.

Hope you can assist
 
Joined
Jun 8, 2001
Messages
2,583
I ran this
DoCmd.TransferText acExportDelim, , "EMail01_test", "H:\A1\export\Import.txt", False

and it exported the table. You may need the full qualified name for Y:\
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top