T
TeeSee
Could someone please tell me why this doesn't work. I swear it did
when I first installed it from an old post within this group ..... but
today it doesn't.
Sub CheckMailCodeFormat(strZip)
dim strZip as String
Select Case Len(strZip)
Case 7
'Canadian postal code (with space)
If strZip Like "@#@ #@#" Then ' There is one space in the
middle of the like string
Me.txtZipCode.Value = UCase(strZip)
Else
MsgBox "'" & strZip & "' is not a valid US or Canadian
postal code."
Me.txtZipCode.Value = Null
End If
end select
end sub
As I step through the sub the inputed string shows correctly as for
instance "n7s 3t9"
If I enter the input string without the space CASE6 catches and
properly formats it.
It is probably staring me right in the face but I can't see it.
Thanks as always
when I first installed it from an old post within this group ..... but
today it doesn't.
Sub CheckMailCodeFormat(strZip)
dim strZip as String
Select Case Len(strZip)
Case 7
'Canadian postal code (with space)
If strZip Like "@#@ #@#" Then ' There is one space in the
middle of the like string
Me.txtZipCode.Value = UCase(strZip)
Else
MsgBox "'" & strZip & "' is not a valid US or Canadian
postal code."
Me.txtZipCode.Value = Null
End If
end select
end sub
As I step through the sub the inputed string shows correctly as for
instance "n7s 3t9"
If I enter the input string without the space CASE6 catches and
properly formats it.
It is probably staring me right in the face but I can't see it.
Thanks as always