PC Review


Reply
Thread Tools Rate Thread

How do I parse a phone number?

 
 
gagecres
Guest
Posts: n/a
 
      4th May 2010
I have a report where I use a text box to enter a phone number that the user
has entered on the main form. Currently, I have my verbiage with the phone
number text box right next to it. For example, "I can be reached at:" [Phone
Number]. When I do this the phone number is in the format I would expect,
(123)456-7890. I made a change to the line so that the entire line is in the
same text box. For example, ="discuss this further, I can be reached at: " &
[Investor Phone] & "." When I do this the phone number appears like so,
1234567890. Is there a way I can enter this line into the text box so that
the phone number has the parenthesis and dash , i.e. (123)456-7890?
 
Reply With Quote
 
 
 
 
Petr Danes
Guest
Posts: n/a
 
      4th May 2010
If you always have all ten digits, something like this might work:

="discuss this further, I can be reached at: " & Format$([Investor
Phone],"(###)###-####")

Pete


"gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m pÅ™Ã*spÄ›vku
news:7B8E2324-744D-4B29-A2F9-(E-Mail Removed)...
>I have a report where I use a text box to enter a phone number that the
>user
> has entered on the main form. Currently, I have my verbiage with the
> phone
> number text box right next to it. For example, "I can be reached at:"
> [Phone
> Number]. When I do this the phone number is in the format I would expect,
> (123)456-7890. I made a change to the line so that the entire line is in
> the
> same text box. For example, ="discuss this further, I can be reached at:
> " &
> [Investor Phone] & "." When I do this the phone number appears like so,
> 1234567890. Is there a way I can enter this line into the text box so
> that
> the phone number has the parenthesis and dash , i.e. (123)456-7890?


 
Reply With Quote
 
gagecres
Guest
Posts: n/a
 
      4th May 2010
I keep getting a syntax error.

"Petr Danes" wrote:

> If you always have all ten digits, something like this might work:
>
> ="discuss this further, I can be reached at: " & Format$([Investor
> Phone],"(###)###-####")
>
> Pete
>
>
> "gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m pÅ™Ã*spÄ›vku
> news:7B8E2324-744D-4B29-A2F9-(E-Mail Removed)...
> >I have a report where I use a text box to enter a phone number that the
> >user
> > has entered on the main form. Currently, I have my verbiage with the
> > phone
> > number text box right next to it. For example, "I can be reached at:"
> > [Phone
> > Number]. When I do this the phone number is in the format I would expect,
> > (123)456-7890. I made a change to the line so that the entire line is in
> > the
> > same text box. For example, ="discuss this further, I can be reached at:
> > " &
> > [Investor Phone] & "." When I do this the phone number appears like so,
> > 1234567890. Is there a way I can enter this line into the text box so
> > that
> > the phone number has the parenthesis and dash , i.e. (123)456-7890?

>
> .
>

 
Reply With Quote
 
fredg
Guest
Posts: n/a
 
      5th May 2010
On Tue, 4 May 2010 14:47:01 -0700, gagecres wrote:

> I keep getting a syntax error.
>
> "Petr Danes" wrote:
>
>> If you always have all ten digits, something like this might work:
>>
>> ="discuss this further, I can be reached at: " & Format$([Investor
>> Phone],"(###)###-####")
>>
>> Pete
>>
>> "gagecres" <(E-Mail Removed)> pí¹e v diskusním pøíspìvku
>> news:7B8E2324-744D-4B29-A2F9-(E-Mail Removed)...
>>>I have a report where I use a text box to enter a phone number that the
>>>user
>>> has entered on the main form. Currently, I have my verbiage with the
>>> phone
>>> number text box right next to it. For example, "I can be reached at:"
>>> [Phone
>>> Number]. When I do this the phone number is in the format I would expect,
>>> (123)456-7890. I made a change to the line so that the entire line is in
>>> the
>>> same text box. For example, ="discuss this further, I can be reached at:
>>> " &
>>> [Investor Phone] & "." When I do this the phone number appears like so,
>>> 1234567890. Is there a way I can enter this line into the text box so
>>> that
>>> the phone number has the parenthesis and dash , i.e. (123)456-7890?

>>
>> .
>>


Did you check for improper word wrap?
You'll have to post your exact expression by copying it and pasting it
into a reply message..
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
Petr Danes
Guest
Posts: n/a
 
      5th May 2010
I gave it in the form you would use it in VBA code. If you're using the
expressions in a query, form or report, use it without the dollar sign. Also
try with a semicolon instead of a comma.

Pete


"gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m pÅ™Ã*spÄ›vku
news:81D0CA53-29F5-4841-84E3-(E-Mail Removed)...
>I keep getting a syntax error.
>
> "Petr Danes" wrote:
>
>> If you always have all ten digits, something like this might work:
>>
>> ="discuss this further, I can be reached at: " & Format$([Investor
>> Phone],"(###)###-####")
>>
>> Pete
>>
>>
>> "gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m
>> pÅ™Ã*spÄ›vku
>> news:7B8E2324-744D-4B29-A2F9-(E-Mail Removed)...
>> >I have a report where I use a text box to enter a phone number that the
>> >user
>> > has entered on the main form. Currently, I have my verbiage with the
>> > phone
>> > number text box right next to it. For example, "I can be reached at:"
>> > [Phone
>> > Number]. When I do this the phone number is in the format I would
>> > expect,
>> > (123)456-7890. I made a change to the line so that the entire line is
>> > in
>> > the
>> > same text box. For example, ="discuss this further, I can be reached
>> > at:
>> > " &
>> > [Investor Phone] & "." When I do this the phone number appears like
>> > so,
>> > 1234567890. Is there a way I can enter this line into the text box so
>> > that
>> > the phone number has the parenthesis and dash , i.e. (123)456-7890?

>>
>> .
>>


 
Reply With Quote
 
Petr Danes
Guest
Posts: n/a
 
      5th May 2010
And another 'brute force' method:

="discuss this further, I can be reached at: (" & left([Investor Phone];3) &
")" & mid([Investor Phone];4;3) & "-" & right([Investor Phone];4)

Pete



"gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m pÅ™Ã*spÄ›vku
news:81D0CA53-29F5-4841-84E3-(E-Mail Removed)...
>I keep getting a syntax error.
>
> "Petr Danes" wrote:
>
>> If you always have all ten digits, something like this might work:
>>
>> ="discuss this further, I can be reached at: " & Format$([Investor
>> Phone],"(###)###-####")
>>
>> Pete
>>
>>
>> "gagecres" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m
>> pÅ™Ã*spÄ›vku
>> news:7B8E2324-744D-4B29-A2F9-(E-Mail Removed)...
>> >I have a report where I use a text box to enter a phone number that the
>> >user
>> > has entered on the main form. Currently, I have my verbiage with the
>> > phone
>> > number text box right next to it. For example, "I can be reached at:"
>> > [Phone
>> > Number]. When I do this the phone number is in the format I would
>> > expect,
>> > (123)456-7890. I made a change to the line so that the entire line is
>> > in
>> > the
>> > same text box. For example, ="discuss this further, I can be reached
>> > at:
>> > " &
>> > [Investor Phone] & "." When I do this the phone number appears like
>> > so,
>> > 1234567890. Is there a way I can enter this line into the text box so
>> > that
>> > the phone number has the parenthesis and dash , i.e. (123)456-7890?

>>
>> .
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact Phone Number & account Phone number augustus Microsoft Outlook BCM 0 24th Jul 2009 01:15 AM
new type of phone number in phone number list when adding new contacts Boatman Microsoft Outlook Discussion 4 7th Nov 2008 12:51 AM
Can't find a phone number that is in Phone Number Field? =?Utf-8?B?TWFyaw==?= Microsoft Outlook Contacts 1 8th Nov 2006 08:04 PM
Dialing numbers after initial phone number on PPC 2003 Phone Edition eric.mobiledev@gmail.com Microsoft Dot NET Compact Framework 1 4th Oct 2005 10:46 PM
Outlook 2003 inserting +1 in phone number leads to cell phone prob timmyran Microsoft Outlook Contacts 0 27th Mar 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 PM.