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!

trouble writing to random access file

Status
Not open for further replies.

tyedyejenn

Programmer
Jun 14, 2000
35
US
My Program is written in VB6

I need some help with a problem I am having

I need to write certain data to a text file. I have my records writing to the text file but the problem is this:

my records are all on one line
00050212120100 00050204890100


i tried adding a linefeed at the end of the record but the records still appear on 1 line but they have a black rectangle at the end

first I am not sure why a space is added between the records

and second i want my records to look like this

00050212120100
00050204890100

any suggestions?
thank you
very frustrated

Jenn
 
Try using carriage return and line feed (vbCrLf) not only line feed.

bye
 
What-ho!

What method are you using to write to this file? Is it something like Print # or Put? If you're using Print # then it'll put the carrige return / line feed in for you, or it should...you could try adding the characters

chr(10)
chr(13)

to your entries, if you're finding that the VB constants aren't working. Alternatively, try the constant

VBNewLine

as that's supposed to be able to enter the "expected" code to put text on a new line.

Might be able to help a bit more if you show us your code, though :)

Cheerio,

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top