Results 1 to 4 of 4
  1. #1
    daniel.preda is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Montreal
    Posts
    11

    Question Export query to CSV

    I have a query with 4 columns (one invisible - for criteria filtering purposes - criteria is a variable I have to define - inputbox - every time I run the query). The query is created in sql-view using "UNION"



    When I try to export the three columns in CSV format (I need this format for a transffer to another software) it's saying something like:
    "Too few parameters. Expected 1."
    I would also like the export to be done through a macro (a button in a form) and without header row... so a VBA code would be perfect...

    Please... can anyone help?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by daniel.preda View Post
    I have a query with 4 columns (one invisible - for criteria filtering purposes
    that is most likely the reason then. I doubt you can export with a popup parameter like that. could you a form or something and substitute a form-referenced field into the WHERE clause where you now have the popup parameter? that would, for one, would enable the exporting via whatever method you choose.

  3. #3
    daniel.preda is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Montreal
    Posts
    11

    Doesn't work

    I've created a form.
    Now the criteria is taken out from this form... no popup/inputbox anymore...
    The same error...

  4. #4
    daniel.preda is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Montreal
    Posts
    11
    Funny thing...

    I only have the error if I try File->Export->*.CSV

    I tried with a code and it works perfectly:

    DoCmd.TransferText TransferType:=acExportDelim, _
    TableName:="my query", FileName:="c:\test.csv"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Export
    By vvasudev in forum Import/Export Data
    Replies: 2
    Last Post: 01-20-2010, 11:42 AM
  2. Export query without saving
    By prag in forum Queries
    Replies: 1
    Last Post: 11-18-2009, 06:22 PM
  3. Export Query to Various Excel Files
    By dalet in forum Import/Export Data
    Replies: 7
    Last Post: 11-09-2009, 09:22 AM
  4. Export a simple query result to an excel file
    By wop_nuno in forum Import/Export Data
    Replies: 1
    Last Post: 05-21-2009, 04:18 AM
  5. Export Access reports/query results to Outlook Calendar/Task
    By kfinpgh in forum Import/Export Data
    Replies: 0
    Last Post: 02-22-2007, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums