Import Text file into VB(MS access) issue due to carriage returns

chris-uk-lad

Registered User.
Local time
Today, 11:40
Joined
Jul 8, 2008
Messages
271
Hi all

I currently have a text file which is interpreting a number of columns as one long string, due to carriage returns (Chr$(13) i think?). I have been having trouble trying to import this text file into an MS Access table using VB code but cannot work it out. So far my script will read in a strong, and populate cells using the mid/instr method using a "while not EOF", but i don't know how to stop at the carriage return and move to a new line

All help appreciated, thanks
 
I'd really appreciate if anyone could give mt he slightest direciton of which to follow on this, just has me stumped.
 
If reading it in puts it all into one sting use the Split function to break into an array you can use.

variantArray = Split(YourString,vbCr)
 

Users who are viewing this thread

Back
Top Bottom