1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: How to export table to a .txt file

Discussion in 'Business Applications' started by nursell, Jan 2, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. nursell

    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
     
  2. draceplace

    draceplace

    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?
     
  3. nursell

    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
     
  4. draceplace

    draceplace

    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:\
     
  5. nursell

    nursell Thread Starter

    Joined:
    Jul 26, 2011
    Messages:
    143
    Thank you i got it working :)
     
  6. Sponsor

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 733,556 other people just like you!

Loading...
Similar Threads - Solved export table
  1. flovettsr
    Replies:
    6
    Views:
    306
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1083446

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice