what would I do to allow only the exceptions of NE, SE, NW, SW, to be read in all uppercase
. They always follow the address.
Here is another method:
Code:
Private Sub Address_AfterUpdate()
Dim tmp As String
Dim tmpAddress As String
Dim sAddress As String
Dim dot As String
Dim Pos As Integer
Me.Address = StrConv(Me.Address, vbProperCase)
sAddress = Trim(Me.Address)
'find last space
Pos = Len(sAddress) - InStrRev(sAddress, " ")
'check of there is a period
dot = Right(sAddress, 1)
If dot <> "." Then
dot = "."
End If
tmp = Right(sAddress, Pos)
tmp = Replace(tmp, ".", "")
If tmp = "nw" Or tmp = "ne" Or tmp = "SW" Or tmp = "SE" Then
tmp = UCase(tmp)
tmpAddress = Trim(Left(sAddress, Len(sAddress) - Pos))
Me.Address = tmpAddress & " " & tmp & dot
End If
End Sub