Normal Topic Phone Number Format (Read 3990 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Phone Number Format
Jan 20th, 2005 at 6:04pm
Print Post Print Post  
What & where do I put into an application so that when a user enters a phone number it will be formatted as (area cod) prefix-suffix, e.g. (813) 286-8498.  If this is covered in the user guide, I would appreciate the page reference.  Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Phone Number Format
Reply #1 - Jan 20th, 2005 at 6:22pm
Print Post Print Post  
Quote:
What & where do I put into an application so that when a user enters a phone number it will be formatted as (area cod) prefix-suffix, e.g. (813) 286-8498.  If this is covered in the user guide, I would appreciate the page reference.  Thanks!


Spencer,

A couple of methods for doing this are covered in this thread:
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=program;action=display;...

BTW, you may want to consider that many phone numbers, such as international numbers and those with extensions do not fit the format you describe. A more flexible format routine may be needed if you need to handle those sorts of phone numbers.  Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Phone Number Format
Reply #2 - Jan 20th, 2005 at 6:38pm
Print Post Print Post  
Hmmmm, Spencer

I know that name from somewhere.......

Good to hear from you again! Grin
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Number Format
Reply #3 - Jan 21st, 2005 at 8:21pm
Print Post Print Post  
Thanks much for the help on phone number.  I had tried  "workphone = "(" +@left(workphone,3) + ")"  + @ mid(workphone, 4,3) + "-" + @right(workphone,4)

Although it worked on an inital input of a phone #, there were some problems.  If I had a field with a number in it and deleted it, I was left with () -

I thought back to my Q&A days and simply prefixed the programming with If @len(workphone) = 10 then       etc.

That way it would not work unless I entered 10 digits.  This also allows me to format the "occasional" international phone # without it being affected.  Thanks much.

HEY BOB HANSEN - how nice to see you around.  Going "way back" it seems to me you were going to call me and never did.  You can reach me here in Tampa at (813) 286-8498.  I would love to hear from you.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Phone Number Format
Reply #4 - Jan 22nd, 2005 at 2:42pm
Print Post Print Post  
Hello Spencer,

Glad to see you here in the forum. I was wondering what you were up to these days. Smiley

Looks like you moved south - or are you just there during the winter?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Number Format
Reply #5 - Mar 5th, 2005 at 9:15pm
Print Post Print Post  
Carl -

You are right; I never saw this "reply" from you (until I read your message in another thread).  Once again, it is very good to be "in touch."

For quite some time I migrated back and forth between New York and Tampa.  When I couldn't stand it any more (about 2 or 3 years ago, now), I moved to Tampa and am extremely happy to be here.

I'll be looking forward to future contact.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged