G
Guest
I am trying to import data from a text type file into a table. Problem is,
the data involves names, some with middle initials, some without.
I need the data to be without initials....so, I have the following line to
add the data:
tblEBIZHours![TECHNAME] = Left(tblEBIZTemp![Emp Nm], InStr(1,
tblEBIZTemp![Emp Nm], ",") - 1) & ", " & Trim(Mid(tblEBIZTemp![Emp Nm],
InStr(1, tblEBIZTemp![Emp Nm], " ") + 1, InStr(InStr(1, tblEBIZTemp![Emp Nm],
" ") + 1, tblEBIZTemp![Emp Nm], " ") - InStr(1, tblEBIZTemp![Emp Nm], " ")))
Which works fine if there is a middle initial, however, I error out if the
code doesn't find anything with a middle initial. I tried an If...Then
using IsNull, that didn't work either.
Any suggestions?
I'm using Access 2003
the data involves names, some with middle initials, some without.
I need the data to be without initials....so, I have the following line to
add the data:
tblEBIZHours![TECHNAME] = Left(tblEBIZTemp![Emp Nm], InStr(1,
tblEBIZTemp![Emp Nm], ",") - 1) & ", " & Trim(Mid(tblEBIZTemp![Emp Nm],
InStr(1, tblEBIZTemp![Emp Nm], " ") + 1, InStr(InStr(1, tblEBIZTemp![Emp Nm],
" ") + 1, tblEBIZTemp![Emp Nm], " ") - InStr(1, tblEBIZTemp![Emp Nm], " ")))
Which works fine if there is a middle initial, however, I error out if the
code doesn't find anything with a middle initial. I tried an If...Then
using IsNull, that didn't work either.
Any suggestions?
I'm using Access 2003