Option Compare Database
Function setNewText(text As String) As String
Dim strText As String
Dim newString As String
strText = Left(text, 3)
Select Case strText
Case "5-1": newString = Replace(text, strText, "A-")
Case "6-1": newString = Replace(text, strText, "B-")
Case "7-1": newString = Replace(text, strText, "C-")
Case "8-1": newString = Replace(text, strText, "D-")
Case "9-1": newString = Replace(text, strText, "E-")
Case Else: newString = "Error"
End Select
setNewText = newString
End Function