I need to export records from an Access table to a text file in fixed length format. I was going to use transfertxt but I need to append it to an existing file. I tried using the write command but it will only do comma delimited and the print command isn't working either. Is there a way to do this?
Here is part of my code using write
absrs.MoveFirst
Open "c:\test.txt" For Append As #1
Do While Not absrs.EOF
i = 0
For Each fld In absrs.Fields
If IsNull(absrs.Fields(i)) Then
absrs.Fields(i) = " "
End If
fldvalue = absrs.Fields(i)
write #1, fldvalue,
i = i + 1
Next
write #1, Chr(13)
absrs.MoveNext
Loop
Close #1
Thanks,
Anthony
Here is part of my code using write
absrs.MoveFirst
Open "c:\test.txt" For Append As #1
Do While Not absrs.EOF
i = 0
For Each fld In absrs.Fields
If IsNull(absrs.Fields(i)) Then
absrs.Fields(i) = " "
End If
fldvalue = absrs.Fields(i)
write #1, fldvalue,
i = i + 1
Next
write #1, Chr(13)
absrs.MoveNext
Loop
Close #1
Thanks,
Anthony