So I'm passing a masked telephone number in the form of (999)999-9999 to a Function that 'strips' the numbers out and puts them into a string that I then use in an Update SQL statement. So far I have the code below that of course doesn't do anything:
Function StripPhone(ByVa l sPhone as String) as String
Dim i as Integer
Dim sStripped as String
For i = 1 to Len(sPhone)
If IsNumeric(Mid(s Phone, i)) Then
sStripped = i
sStripped = sStripped & Mid(sPhone, i)
End if
i = i + 1
Next
StripPhone = sStripped
End Function
Function StripPhone(ByVa l sPhone as String) as String
Dim i as Integer
Dim sStripped as String
For i = 1 to Len(sPhone)
If IsNumeric(Mid(s Phone, i)) Then
sStripped = i
sStripped = sStripped & Mid(sPhone, i)
End if
i = i + 1
Next
StripPhone = sStripped
End Function
Comment