Save query output to txt

D

Diogo

Hi there,

I've searched but came up empty...

Is there a way to create a query that saves the result to a txt file??

Something like:

Select * From tblsales >> sales.txt

It could save it in the same folder as the .mbd file

Thanks in advance
 
J

John W. Vinson

Hi there,

I've searched but came up empty...

Is there a way to create a query that saves the result to a txt file??

Something like:

Select * From tblsales >> sales.txt

It could save it in the same folder as the .mbd file

Thanks in advance

Save the Query (or, if you want to export the entire table skip the query).

Select the query (or table) in the database window and select File... Export.

To do this programmatically, use the TransferText method - see the VBA help
file for that keyword for details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top