Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. TransferText and FileStream Incompatibility... [modified]

TransferText and FileStream Incompatibility... [modified]

Scheduled Pinned Locked Moved Database
databasequestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    new_phoenix
    wrote on last edited by
    #1

    Is it possible to utilize the TransferText function from a database table in MS Access to a TextFile object? I need to be able to write three lines of code to a file and then transfer the records from the database table to the very same file utilizing the TransferText approach because the file needs to be presented in a certain way to the .CSV file. Is this possible? I would appreciate any assistance you could provide. Here is the code so far:

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile(strNewOutputString, True)
    strDatePicker = dteDatePicker.Value
    dteMonth = Month(strDatePicker)
    a.WriteLine ("ACTUALC")
    a.WriteLine (dteMonth & ",,")
    a.WriteLine (dteMonth & ",,")

        'Needs to be able to transfer the text in this format using the "Standard Output" specification format.
        DoCmd.TransferText acExportDelim, "Standard Output", \_
            "tblExportCSV", strNewOutputString, False
    
        a.Close
    

    modified on Friday, December 14, 2007 12:53:54 PM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups