Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    11

    Unanswered: Export MS Access Query to csv file

    I am trying to export a query to csv file.

    At the click of a button on a form, I need info in a query (qEndOfYearIRS) exported to c:\ as a .csv file.

    This is what I have right now. What am I doing wrong?

    Dim stDocName As String

    stDocName = "qEndOfYearIRS"
    'DoCmd.OpenQuery stDocName, acNormal, acEdit
    DoCmd.OutputTo acOutputQuery, "qEndOfYearIRS", "c:\EndOfYearIRS.csv", True

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I always use the TransferText method of the DoCmd object. I would also suggest trying to get a macro to work. Sometimes the extra help in the macro setup will you figure out the appropriate parameters for a given method.

Posting Permissions

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