From: Bruce on 13 Mar 2010 11:54 What is a phone number input mask that would result in the first case 916.723.5828 and second case if 916 is not entered 723.5828 notice the first "." is left off.
From: De Jager on 13 Mar 2010 12:28 "Bruce" <Bruce(a)discussions.microsoft.com> wrote in message news:B4830038-5478-4859-B5AD-70C5311EDF1F(a)microsoft.com... > What is a phone number input mask that would result in the first case > 916.723.5828 and second case if 916 is not entered 723.5828 notice the > first > "." is left off.
From: Arvin Meyer [MVP] on 13 Mar 2010 23:56 "Bruce" <Bruce(a)discussions.microsoft.com> wrote in message news:B4830038-5478-4859-B5AD-70C5311EDF1F(a)microsoft.com... > What is a phone number input mask that would result in the first case > 916.723.5828 and second case if 916 is not entered 723.5828 notice the > first > "." is left off. This might work for formating the display: Public Function FormatPhone(strIn As String) As Variant On Error Resume Next If InStr(1, strIn, "@") >= 1 Then FormatPhone = strIn Exit Function End If Select Case Len(strIn & vbNullString) Case 0 FormatPhone = Null Case 7 FormatPhone = Format(strIn, "@@@.@@@@") Case 10 FormatPhone = Format(strIn, "@@@.@@@.@@@@") Case Else FormatPhone = strIn End Select End Function -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access
|
Pages: 1 Prev: Close and Inactive form Next: Can't uncheck "Use DDE" for .mdb files |