Reports and Phone Number Format

N

Nancy

I created a report to show the info from a form. On my tables the phone
number & fax number for my vendors show up in the proper format. ie (999)
999-9999. The reprot is based on a query that I created. Everywhere I
look, the phone number format is correct. But when I open my report it is
not. It comes in the following format. 9999999999. Any ideas on what I am
missing? Everything else is working beautifuly.
 
F

fredg

I created a report to show the info from a form. On my tables the phone
number & fax number for my vendors show up in the proper format. ie (999)
999-9999. The reprot is based on a query that I created. Everywhere I
look, the phone number format is correct. But when I open my report it is
not. It comes in the following format. 9999999999. Any ideas on what I am
missing? Everything else is working beautifuly.

Most likely you are using an Input Mask on your form to enter the
phone #'s. So, on the form, what you are seeing is the effect of the
mask.
However, you have not set up your mask to store the mask with the
data, so the data is stored as your report is showing it.
If you use the Input Mask wizard to set up a mask it will ask if you
wish to save the mask with the data. Say yes.
The resulting mask will look like this:
!\(999") "000\-0000;0;_

That will only effect newly entered data.

Run an Update query to re-format already entered data.
If all of the records contain 10 digits (area code and phone #)

Update YourTable Set YourTable.PhoneField = Format([PhoneField],"(@@@)
@@@-@@@@");
 
N

Nancy

Thank you for the response, but I am a little confused. I went to the table
in design view. Next to the input mask ifor both the Phone & Fax number it
says:
"!\(999") "000\-0000;0;_. I ran through the procedures for the wizard
anyway.

I have never run an update query. I followed the instructions in the help
menu and I get an error in the lower left hand corner of the screen: This
action has been blocked by disable mode. What is this about. Since this is
a new database there was only one record in the purchase order/report. So, I
added another one just to see if the format would change. It did not.

I didnot understand the last response about: Update YourTable Set
YourTable.PhoneField = Format([PhoneField],"(@@@)
@@@-@@@@"); Where should this go?

Also how do I make the form save the record without closing the form? I
want to enter the info, then hit preview report and go right to the report.
Right now the info will not come up on the report unless I first close/save
the purchase order then open it back up and hit the preview button.


fredg said:
I created a report to show the info from a form. On my tables the phone
number & fax number for my vendors show up in the proper format. ie (999)
999-9999. The reprot is based on a query that I created. Everywhere I
look, the phone number format is correct. But when I open my report it is
not. It comes in the following format. 9999999999. Any ideas on what I am
missing? Everything else is working beautifuly.

Most likely you are using an Input Mask on your form to enter the
phone #'s. So, on the form, what you are seeing is the effect of the
mask.
However, you have not set up your mask to store the mask with the
data, so the data is stored as your report is showing it.
If you use the Input Mask wizard to set up a mask it will ask if you
wish to save the mask with the data. Say yes.
The resulting mask will look like this:
!\(999") "000\-0000;0;_

That will only effect newly entered data.

Run an Update query to re-format already entered data.
If all of the records contain 10 digits (area code and phone #)

Update YourTable Set YourTable.PhoneField = Format([PhoneField],"(@@@)
@@@-@@@@");
 
T

Tony Toews [MVP]

Nancy said:
I created a report to show the info from a form. On my tables the phone
number & fax number for my vendors show up in the proper format. ie (999)
999-9999. The reprot is based on a query that I created. Everywhere I
look, the phone number format is correct. But when I open my report it is
not. It comes in the following format. 9999999999. Any ideas on what I am
missing? Everything else is working beautifuly.

All your vendors are all North American, right? None will ever, ever
be in Europe, South America, Japan, China, Australia, the Middle East
or other countries? And you will never, ever have vendors from
outside North America? If so then you can continue to use format or
input mask.

If, however, you're not 100% positive I would suggest letting the user
manually enter the phone number with the spaces, hyphens, ()s etc.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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

Similar Threads

Phone Number Formatting 8
How do I parse a phone number? 6
Show week number in Project Report 0
Access And Phone Numbers 5
view format problem 2
Contact Phone Number Auto Format 0
Data Format 2
phone formatting 2

Top