Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entering phone numbers.
Message
From
31/08/1999 11:56:11
 
 
To
31/08/1999 11:37:38
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00259693
Message ID:
00259708
Views:
21
>Hi All!
>
>I live in a city that is large enough to have 2 area codes. Using an input mask like 9-999-999-9999 allows me to enter phone/fax numbers by including the 1 as the first digit for a long distance number. This inputmask is not good if the leading 1 (or 0) is not acceptable. If I change the input mask to 999-999-9999 I cannot enter the 1, and I don't have code to programmatically determine when to add the 1 or not. If the phone number were entered from right to left, it would format properly more often wouldn't it?
>
>Does anyone have a class that handles phone number formatting with the option to specify what area codes are not long distance and have it preface the 1 when the area code is outside the specified set?
>
>Thanks!

Mike,

Sorry, don't have anything pre written, but one though... if you have a mask of...

9-999-999-9999

In the LostFocus you can padl to 11 spaces... so, if the user entered 7 or 10 digit phone the left most charaters would just stay spaces.

However, I would not want the user to enter the 1... I would, as you said, allow for 10 digits... if they enter 7 default to the local area code, if they enter 10, leave the entered code... then, if the area code is one that needs a 1, you can display that.

Will your computer be dialing the phone also?

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform