title image


Smiley Re: Telefonnummer formatieren


Public Function FormatTelefon(ByVal S)

FormatTelefon = S

If Not IsNull(S) Then

Dim Res As String, I As Long, G As Boolean, Ch As String

S = Replace(S, " ", "")

G = True

For I = Len(S) To 1 Step -1

Ch = Mid(S, I, 1)

If (Ch = "/" Or Ch = "-") And Not G Then Res = " " & Res

G = Not G

If Ch = "/" Or Ch = "-" Then G = True

Res = Ch & Res

If G And I > 1 Then Res = " " & Res

Next I

FormatTelefon = Res

End If

End Function



Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: