G
Guest
I'm a novice, so please bear with me.
Got a field in my db with titles.
Ex: M.D.
D.O.
M.D., PhD.
Want just the 1st title & no punctuation. In query, created a new field to
add a "," @ end (i.e., M.D.,... D.O., ... M.D., PhD.,). Can't figure out the
function. Trying this:
Public Function OneDegree(Degree As String) As String
Dim TempString As String
TempString = ""
Do Until Mid(Degree) = ","
If Mid(Degree) = "." Then
Else
TempString = TempString & Mid(Degree)
End If
Loop
OneDegree = TempString
End Function
I keep getting error "Undefined Function 'OneDegree' in expression. Can
anyone help with the code? Using Office 2K/Access 2K.
Got a field in my db with titles.
Ex: M.D.
D.O.
M.D., PhD.
Want just the 1st title & no punctuation. In query, created a new field to
add a "," @ end (i.e., M.D.,... D.O., ... M.D., PhD.,). Can't figure out the
function. Trying this:
Public Function OneDegree(Degree As String) As String
Dim TempString As String
TempString = ""
Do Until Mid(Degree) = ","
If Mid(Degree) = "." Then
Else
TempString = TempString & Mid(Degree)
End If
Loop
OneDegree = TempString
End Function
I keep getting error "Undefined Function 'OneDegree' in expression. Can
anyone help with the code? Using Office 2K/Access 2K.