area codes
GCC Consulting
gccconsulting at comcast.net
Mon Jul 14 06:32:11 PDT 2008
From: filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com
[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com]
On Behalf Of Robert Pulliam
Sent: Monday, July 14, 2008 8:15 AM
To: filepro-list at lists.celestial.com
Subject: area codes
Is there a way to require that the area code always be entered. West
Virginia is get a second area code and all numbers in the state will have to
be dialed with the area code, ie 10 digits every time.
Thanks in advance - Robert Pulliam
Yes,
I am going to assume that you are using fps phone edit. This will right
justify the phone #s. do a )assuming the phone # is in field fn,
If: mid(fn,1,1) =
Then: BEEP;MSGBOX The Area Code is missing);screen ,fn
Or you could test for ( using strok,
Then Xx=strtok(fn,(,1)
If: xx = or xx = 0
Then: BEEP;MSGBOX The Area Code is missing);screen ,fn
The mid function will use 1 line of code and just tests for any value in the
first position of the field. If no area code is present, this would be
blank.
Strtok will test for the opening paran any place in the field and in this
case starts looking from the first position. Xx will report the first
position of that character. The message will only be displayed if it
doesnt find an opening (.
Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
More information about the Filepro-list
mailing list