Hi
I have a series of name e.g.
BRANCHADMIN
none
101315 - P Mayor
101296 - J Smith
101173 - G Tisdell
101082 - S Penny
100895 - L Butler
100827 - P Flemen
100725 - J Ferris
100674 - J Tailford
100671 - N Carrington
100665 - N Hammond
100456 - C Hillhouse
100452 - L Sunter
100440 - J Mokienko
What I want is just to use the Initial and Surname.
I am using a wrapper function called from within the query
I use the right becuase the staff number may chanmge in length but there will always be "-" so I though work in reverse.
but
I get the following
Any ideas why
Thanks
Phil
I have a series of name e.g.
BRANCHADMIN
none
101315 - P Mayor
101296 - J Smith
101173 - G Tisdell
101082 - S Penny
100895 - L Butler
100827 - P Flemen
100725 - J Ferris
100674 - J Tailford
100671 - N Carrington
100665 - N Hammond
100456 - C Hillhouse
100452 - L Sunter
100440 - J Mokienko
What I want is just to use the Initial and Surname.
I am using a wrapper function called from within the query
Code:
Public Function G_Admin(ByVal BranchAdmin As String) As String
If BranchAdmin <> "none" Then
G_Admin = Right([BranchAdmin], InStr(1, [BranchAdmin], "-") - 1)
End If
End Function
I use the right becuase the staff number may chanmge in length but there will always be "-" so I though work in reverse.
but
I get the following
Code:
Name
Tisdell
S Penny
rington
P Mayor
okienko
llhouse
J Smith
Hammond
ailford
Sunter
Flemen
Ferris
Butler
Any ideas why
Thanks
Phil