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

format problem in the text file...

Status
Not open for further replies.

rbasram

Programmer
Sep 27, 2001
53
0
0
CA
i have made a code that outputs the records one by one to a textfile..
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Dim strPrimaryKey As String 'if it's a text datatype
Set db = CurrentDb
Set rst = db.OpenRecordset("Name1", dbOpenDynaset)
rst.MoveFirst
Do Until rst.EOF
DoCmd.SetWarnings False
DoCmd.OpenQuery "Query1"
DoCmd.SetWarnings True
strPrimaryKey = rst!DocumentID
strSQL = "Select * Into Table1 From Name1 Where [DocumentID] = '" & strPrimaryKey & "'"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.OutputTo acOutputTable, "Table1", acFormatTXT, "C:\Raman\ " & strPrimaryKey & " .txt "
DoCmd.SetWarnings True
rst.MoveNext
Loop


Everting works fine but the output gets really messed up, it is not readible it looks like something like this:

-------------------------------------------------------------------------------------
| DocumentID | SOURCE | AppliesTo | ValidatorName | TouchDate | TopTen | TopicArea | Title | Success |

First it has all the fields and then it gives you the info, it is not readible. Some of the fields are also cutoff(not all the data is diaplayed)

Is it possible we could have the info like the tags.

like this
the tags are not visible...

Name : blb

Doument : gdhsjghjsdjkgghjhdgkd
dgshjhgjkskghs

place : hfjdshgiusguis

please help...

I tried using rtf format but still it is not readible and some of the fields are cut off not all the info can be read.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top