This article was previously published under Q210556
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Option Explicit
Function GetTitle(Titles) As String
Dim sp As Integer
sp = InStr(1, Titles, Chr$(32))
If sp > 0 Then
Select Case Left(Titles, sp - 1)
Case "An", "A", "The" ' add any other articles here!
GetTitle = Mid(Titles, sp + 1)
Case Else
GetTitle = Titles
End Select
Else
GetTitle = Titles
End If
End Function
Query ----- Field: Sorted List: GetTitle([Titles]) Sort: Ascending Show: No Field: [Titles] Show: Yes
Keywords: KB210556, kbprogramming, kbhowto