Question : VBA Export Table to CSV file

Hi

I want to make a "export"button on a form to transform a table into a .csv file.
Can somebody help me with the right VBA code?

I've tried things like:
DoCmd.TransferSpreadsheet acExport, "RESULTS", "C:\Temp\Results.csv"

Hopefully somebody can help me

J

Answer : VBA Export Table to CSV file

Specification is how you tell access to export the text file, whether the delimiter is a comma (for Comma Seperated Values [CSV]) or tabs (Tab delimited) if left blank it will default to access which is comma on my machine
Headers required is whether the field names are required at the beginning of the file.

Try this simple statement:

DoCmd.TransferText acExportDelim, "", "RESULTS", "C:\TEMP\results.csv", False, ""
Random Solutions  
 
programming4us programming4us