Sub chkCorruptRec()
Dim rs As DAO.Recordset, j As Integer, strData As String
Open "C:\myText.txt" For Output As #1
Set rs = CurrentDb.OpenRecordset("Customers")
rs.MoveFirst
Do Until rs.EOF
For j = 0 To rs.Fields.Count - 1
strData = strData & ", " & rs(j)
Next
strData = Mid(strData, 3)
Print #1, strData
strData = ""
rs.MoveNext
Loop
rs.Close
Close #1
End Sub
|