brian said:
I have a table with just one column with 3000 rows. I need to export into a
CSV file so that it looks like this:
data1,data2,data3,data4, etc.
Exporting rows means you will get lines in the text file, so
you need to export a single row with all the values. This
can be done using a function like
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'
that concatenates all the rows. If you create a table with
one row, you can export a query like:
SELECT ConCatenate("SELECT yourfield FROM yourtable", ",")
FROM onerowtable
A completely different approach would be to use Access' file
I/O statements to create the file. This air code outline
provides the general idea:
fnum = FreeFile()
Open "filepath" For Output As fnum
set rs = db.OpenRecordset("yourtable")
Do Until rs.EOF
Print rs!yourfield;
rs.MoveNext
Loop
Close fnum