chris-uk-lad
Registered User.
- Local time
- Today, 08:32
- Joined
- Jul 8, 2008
- Messages
- 271
Hi,
I have a text file that im reading in VB. Im using the following code to specify the start and length of the text i want to import surnames into a table (position 5 in text doc, 9 in length) and these values are closed with a semi-colon.
But not all the Surnames are of the same length, so could read.
Johns;;;;
Burton;;;
Marshall;
so how could i do it, so that with my code above, i can have it read in the value upto the ';' instead of the specified length '9'.
Many Thanks
I have a text file that im reading in VB. Im using the following code to specify the start and length of the text i want to import surnames into a table (position 5 in text doc, 9 in length) and these values are closed with a semi-colon.
Code:
If Trim(Mid(strLineOfText, 5, 9)) <> "" Then
strNINO = Trim(Mid(strLineOfText, 5, 9))
qryExecute![@Surname] = Trim(Mid(strLineOfText, 5, 9))
End If
But not all the Surnames are of the same length, so could read.
Johns;;;;
Burton;;;
Marshall;
so how could i do it, so that with my code above, i can have it read in the value upto the ';' instead of the specified length '9'.
Many Thanks