Solved

how to export query results to a .csv file

Posted on 2007-12-05
5
5,751 Views
Last Modified: 2008-02-01
I need to end up with a csv file that can be used for import and export from one program into another.

I have an access database that reads the data from one program via odbc, massages it and preps it for export into the second program.

there is a query that orders the data for presentation and its the query results that need to end up as the csv file.

I found transfertext, but that only works on tables, not query results.  the table is all text and doesnt export in the correct order.  so I added a query to sort the data.

Any hints?

ACCESS 07 is the version

0
Comment
Question by:Rance_Hall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:jerryb30
ID: 20411630
Sure it works on queries.  have you tried?
0
 
LVL 8

Author Comment

by:Rance_Hall
ID: 20411970
Yes I tried, I get and error from the transfertext function, if I name a query instead of a table I get this error:

I got a Run Time Error '2495'

The Action or Method requires a Table Name argument

0
 
LVL 26

Accepted Solution

by:
jerryb30 earned 50 total points
ID: 20412052
Hmmm.  I just did a transfer text with a query in Access 2003.  I cannot see how 2007 would change anything.
Could you maybe have a space in the query name?  Have you enclosed the query name in brackets?
0
 
LVL 8

Author Comment

by:Rance_Hall
ID: 20412547
I dont have a space in the query name, but I didnt have the query name in quotes ("") I didnt think you needed them when there werent spaces, but now its working, thanks for the reminder.

R
0
 
LVL 26

Expert Comment

by:jerryb30
ID: 20412606
Glad to help.  (On my way to the next level.)
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question