ACC: How to Format Phone Number Fields Using an Update Query (180816)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q180816 Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
If you use an input mask to format a field that contains phone numbers, but
you choose not to store the formatting characters, the phone numbers in
this field do not appear formatted when you use the table as the data
source of a mail merge in Microsoft Word. In addition, the phone numbers do
not appear formatted if you export the table to a text file. This article
demonstrates how to use sample Visual Basic for Applications code with
either an update query or a select query to create a new field that
contains the phone numbers with correct formatting characters.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. REFERENCES
For more information about input masks, search the Help Index for "Create
an input mask to control how data is entered in a field or control," or ask
the Microsoft Access 97 Office Assistant.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbhowto kbProgramming KB180816 |
---|
|