I got some help from another tek-tip user on using the string function. I have a column in my DB that sometimes has two strings in a record. If the record has two strings in the specific column, I need to delete the first string and leave the second. If there is only one string, that string neees to remain. The code I'm using is below. If there are two strings in the column a zero is left in place of the two string... I'm not good with VBA coe so any help is appreciated.
Public Function basScndStr(StrIn As String) As String
Dim MyVar As Variant
MyVar = Split(StrIn)
If (UBound(MyVar) = 0) Then
basScndStr = UBound(MyVar)
Else
MyVar(0) = ""
basScndStr = Trim(Join(MyVar))
End If
End Function
Public Function basScndStr(StrIn As String) As String
Dim MyVar As Variant
MyVar = Split(StrIn)
If (UBound(MyVar) = 0) Then
basScndStr = UBound(MyVar)
Else
MyVar(0) = ""
basScndStr = Trim(Join(MyVar))
End If
End Function