Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a query as csv

Status
Not open for further replies.

dk99

MIS
Jun 20, 2003
76
GB
Is there a way to send a query as a csv automatically.

I have tried within a macro, but the only options are text or excel.

Unforunately excel truncates the fields (as some contain more than 256 characters) and the text looks wrong and cannot be easily read.

Alternatively is there a way I can export a query with fields that contain more than 256 characters (other then text format) ?
 
Have you tried the DoCmd.TransferText method ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I have managed to export the file, however I am unable to sent the file from access ? Any ideas ?
 
what do you mean with send? If you can export, than you have the file you want I would say?
 
The problem is that I want to automate the database so that by the user clicking a button it would sent a csv to a distribution list. At present I use the SendObject function but this truncates the fields that are longer than 256 characters ?

Any help would be appreciated.
 
You could try the acFormatTxt option for the format parameter of your DoCmd.SendObject statement.
 
Thanks, but this sends it as a text file. Any other ideas ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top