martinpratt
Registered User.
- Local time
- Today, 23:39
- Joined
- Oct 17, 2012
- Messages
- 22
HI All,
I am trying to read the first line of a file in access 2010, but it is not returning the correct text.
I am using code
Set readContent = fs.OpenTextFile(pathLong, 1, 0)
lineRead = Mid(readContent.ReadLine, 77, 40)
the result of lineRead in access is - ?A ???? ????? @ ???A ???????
but if it drag the file into notepad I get (on one line) - Ver461 M1 4.61 4.61 MARTIN 937-1424B - JUNCTION - 1/03 4ðÕ4åã@4ðÕ4åã@Í?
I have tried Set readContent = fs.OpenTextFile(pathLong, 1, 1) and 2 but no luck.
All ideas gratfully received
Martin
I am trying to read the first line of a file in access 2010, but it is not returning the correct text.
I am using code
Set readContent = fs.OpenTextFile(pathLong, 1, 0)
lineRead = Mid(readContent.ReadLine, 77, 40)
the result of lineRead in access is - ?A ???? ????? @ ???A ???????
but if it drag the file into notepad I get (on one line) - Ver461 M1 4.61 4.61 MARTIN 937-1424B - JUNCTION - 1/03 4ðÕ4åã@4ðÕ4åã@Í?
I have tried Set readContent = fs.OpenTextFile(pathLong, 1, 1) and 2 but no luck.
All ideas gratfully received
Martin