Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5753
  • Last Modified:

how to export query results to a .csv file

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
Rance_Hall
Asked:
Rance_Hall
  • 3
  • 2
1 Solution
 
jerryb30Commented:
Sure it works on queries.  have you tried?
0
 
Rance_HallAuthor Commented:
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
 
jerryb30Commented:
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
 
Rance_HallAuthor Commented:
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
 
jerryb30Commented:
Glad to help.  (On my way to the next level.)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now