Remove Parentheses from Phone Number

N

Novice2000

Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses. So
most of the phone numbers appear like this: 440 555-5555 and the input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in the
form? Thanks
 
R

ruralguy via AccessMonster.com

Look into the Replace() function.
Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses. So
most of the phone numbers appear like this: 440 555-5555 and the input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in the
form? Thanks
 
J

John W. Vinson

Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses. So
most of the phone numbers appear like this: 440 555-5555 and the input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 
N

Novice2000

Confused (as usual). The information is being drawn from a query obviously,
since the form is populated from three tables. Is this update applied to the
query or the table. I don't want to change the format of the table itself.

John W. Vinson said:
Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses. So
most of the phone numbers appear like this: 440 555-5555 and the input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 
D

Douglas J. Steele

John's advice to use an Update query would permanently change the values in
the table. However, you could simply use the Replace function multiple times
in your Select query to try and fix the display.

What is different about that one number? Are you using a different input
mask for it?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Novice2000 said:
Confused (as usual). The information is being drawn from a query
obviously,
since the form is populated from three tables. Is this update applied to
the
query or the table. I don't want to change the format of the table itself.

John W. Vinson said:
Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses.
So
most of the phone numbers appear like this: 440 555-5555 and the
input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in
the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 
N

Novice2000

The four phone/fax numbers out of the three tables are input like this in the
tables:

Employer fax !\(999") "000\-0000;;
KED fax no input mask
Rep Phone !\(999") "000\-0000;;
Claimant Phone !\(999") "000\-0000;;

Only the Employer fax is still showing the ( )

The input mask in the form is !\ 999" "000\-0000;;_
The select query would be updated, but this is a constantly changing
situation. Whould I have to keep running updates?

Douglas J. Steele said:
John's advice to use an Update query would permanently change the values in
the table. However, you could simply use the Replace function multiple times
in your Select query to try and fix the display.

What is different about that one number? Are you using a different input
mask for it?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Novice2000 said:
Confused (as usual). The information is being drawn from a query
obviously,
since the form is populated from three tables. Is this update applied to
the
query or the table. I don't want to change the format of the table itself.

John W. Vinson said:
On Fri, 24 Aug 2007 13:42:05 -0700, Novice2000

Hi,

I need to populate data into a form which includes 4 phone numbers from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has parentheses.
So
most of the phone numbers appear like this: 440 555-5555 and the
input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still displays
parentheses around the area code. Anyone know how to remove these in
the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 
D

Douglas J. Steele

Are there any formats set on the fields?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Novice2000 said:
The four phone/fax numbers out of the three tables are input like this in
the
tables:

Employer fax !\(999") "000\-0000;;
KED fax no input mask
Rep Phone !\(999") "000\-0000;;
Claimant Phone !\(999") "000\-0000;;

Only the Employer fax is still showing the ( )

The input mask in the form is !\ 999" "000\-0000;;_
The select query would be updated, but this is a constantly changing
situation. Whould I have to keep running updates?

Douglas J. Steele said:
John's advice to use an Update query would permanently change the values
in
the table. However, you could simply use the Replace function multiple
times
in your Select query to try and fix the display.

What is different about that one number? Are you using a different input
mask for it?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Novice2000 said:
Confused (as usual). The information is being drawn from a query
obviously,
since the form is populated from three tables. Is this update applied
to
the
query or the table. I don't want to change the format of the table
itself.

:

On Fri, 24 Aug 2007 13:42:05 -0700, Novice2000

Hi,

I need to populate data into a form which includes 4 phone numbers
from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has
parentheses.
So
most of the phone numbers appear like this: 440 555-5555 and the
input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still
displays
parentheses around the area code. Anyone know how to remove these in
the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 
N

Novice2000

hAll are text fields one, three and four have input masks. That is what is so
weird because the one that is giving me the problem, the first one Employer
fax is set up identically to three and four and they work fine. I am getting
ready to use white out on the form to remove the parentheses in that field
unless you have a better idea. THanks

Douglas J. Steele said:
Are there any formats set on the fields?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Novice2000 said:
The four phone/fax numbers out of the three tables are input like this in
the
tables:

Employer fax !\(999") "000\-0000;;
KED fax no input mask
Rep Phone !\(999") "000\-0000;;
Claimant Phone !\(999") "000\-0000;;

Only the Employer fax is still showing the ( )

The input mask in the form is !\ 999" "000\-0000;;_
The select query would be updated, but this is a constantly changing
situation. Whould I have to keep running updates?

Douglas J. Steele said:
John's advice to use an Update query would permanently change the values
in
the table. However, you could simply use the Replace function multiple
times
in your Select query to try and fix the display.

What is different about that one number? Are you using a different input
mask for it?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Confused (as usual). The information is being drawn from a query
obviously,
since the form is populated from three tables. Is this update applied
to
the
query or the table. I don't want to change the format of the table
itself.

:

On Fri, 24 Aug 2007 13:42:05 -0700, Novice2000

Hi,

I need to populate data into a form which includes 4 phone numbers
from
three tables. All but one of the phone numbers is cooperating.

The data is printed onto a hardcopy form that already has
parentheses.
So
most of the phone numbers appear like this: 440 555-5555 and the
input
mask looks like this: !\ 999" "000\-0000;;_

I have one phone number that in spite of everything I try still
displays
parentheses around the area code. Anyone know how to remove these in
the
form? Thanks

Run an Update query updating the field to

Replace(Replace([Phone], ")", ""), "(", "")

to replace all ) and ( characters with empty strings.

You may want to do the same with "-" and " ".

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top