Click to See Complete Forum and Search --> : Export recordset to ASCII file


VLT
August 4th, 2001, 06:12 PM
Hi there,
How can I export recordset data to ASCII file using VB code? I'm looking for the same effect as "DoCmd.TransferText acExportDelim......" has in Access?
Thanks

Andrew R.
August 8th, 2001, 10:12 AM
You can do it manually: in a loop read all values of your recordset and write those into the text file.

Iouri
August 8th, 2001, 12:55 PM
1.Create a recordset
2.Write records to the text file


Open "c:\temp\temp.txt" For Output As #1 'to write to

rs.movefirst
do while not rs.eof
Print #1, rs!Field1 & vbTab & rs!Field2 & etc...
rs.movenext
loop
Close #1


Iouri Boutchkine
iouri@hotsheet.com