reubenb
07-18-2008, 09:04 AM
hey
i have a 'full name' field, which they could enter 'Firstname Midname Lastname' or 'Firstname Lastname'.
I need the last word to be 'lastname', and the first two words to be 'firstname'... for the first option
and
I need the last word to be 'lastname', and the first word to be 'firstname'... for the second option
but it may not always have 3 words, so how would i do this?
this is what i have so far..
Dim arrayname
arrayname = Split(db_field), " ")
but will only arrayname(0) and arrayname(1) would work, but it would die if i had arrayname(2) and it doesnt exist?
i have a 'full name' field, which they could enter 'Firstname Midname Lastname' or 'Firstname Lastname'.
I need the last word to be 'lastname', and the first two words to be 'firstname'... for the first option
and
I need the last word to be 'lastname', and the first word to be 'firstname'... for the second option
but it may not always have 3 words, so how would i do this?
this is what i have so far..
Dim arrayname
arrayname = Split(db_field), " ")
but will only arrayname(0) and arrayname(1) would work, but it would die if i had arrayname(2) and it doesnt exist?