Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export specification (A2K Sr-1)

    I have created an export spec which works fine if I use it manually
    via the Export command and follow the bouncing ball.
    But when I use it in code it produces the correct data
    but with the inclusion of the field names as my first line.
    This is the code
    Dim stExportDocName As String
    Dim stDocName As String
    Dim stExportSpec As String

    stExportDocName = "D:dtfcoCode.csv"
    stDocName = "tblOracleExport"
    stExportSpec = "CoExportSpec"

    DoCmd.TransferText acExportDelim, stExportSpec, stDocName, stExportDocName, True

    This is what I get, but I only want the second line
    "Year","Type","Period"
    "2004","BUD","JUL-03"
    What am I doing wrong?
    TIA

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Export specification (A2K Sr-1)

    Change the value in the last argument to False. Your code is telling Access to include field names.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export specification (A2K Sr-1)

    Thanks Charlotte,
    I'll try and take more time in the future so that I don't clutter up the
    lounge with answers that I should have been able to find myself.
    Regards
    Michael

Posting Permissions

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