help! PLZ - making a table output... i have no idea how to do it

ka_oghli

Newcomer
Joined
Dec 5, 2003
Messages
1
i wud really appreciate it if sum1 cud tell me how to make a table format output in VB, i need to do sumthing like this:

FIRSTNAME LASTNAME DOB AS1 AS2 AS3 AS4 AS5
Josh Reynolds 03/04/85 HIS GEO ENG MUS GST
Diana Smith FRE GER JAP
Sukwinder Johnson 23/06/85 MAT PHY

I need all these so that when i enter the firstname for instance, then for the firstname it will chop off anything after 15 characters;

firstname 15 character from columns 1-15
surname 15 characters from columns 16-30
DOB 10 characters from 31-40
AS1 5 characters from columns 40-45
AS2 5 characters from columns 45-50
AS3 5 characters from columns 50-55
AS4 5 characters from columns 55-60
AS5 5 characters from columns 60-65

all i need is when you enter one line of data such as

josh reynolds 03/04/85 HIS GEO ENG MUS GST

then it will output this data in table format such as above!

PLZ PLZ PLZ if sum1 can do this or show me how i wud really appreciate it! in VB.net plz... thnx!!
 
Perhaps you can use the .Split method to get each piece of string that you are looking at into an array.
Then use the .SubString method to get the first couple of characters from each string in the array.
For array element zero, check if the Elem(0).Length > 15 if it is then use SubString to get the first 15 characters, otherwise you can send the whole thing into your result. :)
 
Back
Top