Hello VB.Net members.  I'm a Network/Server admin who has had some web
page maintenance thrown into my lap.   We have an ASP page that is
coded with some VB that splits a field in two so that we can get the
First Letter of a persons first and last name.  Below is the code that
does this...

dim strPatientFullName
        strPatientFullName = Split(strPatientName2, ",")
        strPatientName = left(strpatientfullname(0), 1) & ", " &
left(strpatientfullname(1), 2)

It looks for the comma to do the split.  Here is my
problem...sometimes the users who do the input do not use a comma but
rather just a space.  When this happens our program blows up and only
lists people up to the last person before the one w/ no comma.  How
can I do some error handling on my site so I can do the split at the
comma and then if there is no comma have it check for a space and then
if there is no space have it just grab the first letter of the
strPatientFullName?

Any help is greatly appreciated and if I need to clarify something
please let me know.

Thanks,

Reply via email to