Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Access Input Masks for Phone Numbers
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   15 years ago

Here's a VERY good question I received from an Access user in South Africa:

Q: Hello. I am fairly new to MS Access. I am using Access 2007. I am setting up a database to keep record of all customers. I've created a table with fields for all their details (Name, Address etc.). One of the field I've created is "Telephone Number" and I've specified an input mask of \(999") "999\-9999 to force the records to conform to a certain format (e.g. (012) 555-3522 - the format for my country). However, there are a few clients outside my country, and so the telephone numbers for them may have extra digits (possibly a dialing code for that country or something like that) which my current input mask of course will not allow. What would your advice be for these few clients where they are the "exception to the rule". Can the input mask be ignored for certain records? Or should i do away with the input mask entirely? Thank you.


A:VERY good question.

You have two options. You can either expand your input mask with a few ### characters which would allow for additional digits in the current field...

OR...

Do what I do in my database which is to have a second phone number field for international customers.

I have an input mask of 000-000-0000 for my US customers because EVERY US (and Canada) phone number HAS to conform to this standard.

I have a second field altogether (Phone2) for international customers. This way all of my data is uniform for 90% of my customers, AND I don't have to worry about special rules for a very small percentage of my data.

No, Access does not really let you use an Input Mask "some" of the time. You either have one or you don't. You could specially validate your customers based on their country, but that would involve a form-level function in an AfterUpdate event - which is probably more than you want to go into right now if you are new to Access.

I cover Input Masks in detail in my Access 102 class

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Access Input Masks for Phone Numbers
Get notifications when this page is updated
 
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 5:58:05 AM. PLT: 0s
Keywords: access tips input masks phone numbers  PermaLink  Access Input Masks for Phone Numbers