Is This Content Helpful?
We're glad to know this article was helpful.
This article includes the procedure for displaying labels using the proper case. For example, a field with a city name such as 'PORT HOPE' will be labeled as 'Port Hope'.
Function FindLabel ( [LABELFIELD] )
FindLabel = PCase( [LABELFIELD] )
Private Function PCase(byVal string)
Dim Tmp, Word, Tmp1, Tmp2, firstCt, a, sentence, c, i
If IsNull(string) Then
PCase = Null
string = CStr( string )
a = Split( string, vbCrLf )
c = UBound(a)
i = 0
For each sentence in a
Tmp = Trim( sentence )
Tmp = split( sentence, " " )
For Each Word In Tmp
Word = Trim( Word )
Tmp1 = UCase( Left( Word, 1 ) )
Tmp2 = LCase( Mid( Word, 2 ) )
PCase = PCase & Tmp1 & tmp2 & " "
PCase = Left( PCase, Len(PCase) - 1 )
If i = c then
PCase = PCase & vbCrLf
i = i + 1
When using this code, replace all occurrences of the LABELFIELD field name with the name of the field in your table.