Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Unanswered: Export multiple tables to one text file

    is there a way to export multiple tables that have different fields into one fixed format text file.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    As long as the fields fit into the first format text file, then yes.

    Just write the first one and append the others, or design a UNION query to get all the data into one object and export that.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    What would the code look like to do this. I have three files. A header file with one record(row), detail file with multiple rows, and a trailer file with one row.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Quote Originally Posted by bdouglas
    one fixed format text file.
    Quote Originally Posted by bdouglas
    ...I have three files...
    Make up your mind!!

    The code would look like most exporting code, if the destination format is a "standard" one, then the code is very easy. Take a look at DoCmd.TransferText.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •