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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export access table to a textfile

Status
Not open for further replies.

Phutie

Programmer
Jul 31, 2000
29
PH
Hi,

I've seen codes on how to export a records from a table to a tab delimited text file but through the use of ms flexgrid or ADO controls.

I'm using a data control and dbgrid32.ocx. How can I export my table into a tab delimited textfile then? pls. help...

thanks,

Phutie
 
Dim fso As New FileSystemObject
Dim f As TextStream
Set f = fso_OpenTextFile("C:\Test.txt", ForAppending)
Dim i, j
For i = 0 to MsFlexGrid1.Rows - 1
For j = 0 to MsFlexGrid1.Cols - 1
f.Write(MsFlexGrid1.TextMatrix(i, j)) & ";"
Next
f.Write() & vbCrLf
Next Thanks

Neo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top