Access 2007-2016
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 

News      User Comments     History     Notify Me

4/25/2009 1:06:09 AM
Access Input Masks for Phone Numbers
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

 
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

Permanent Link
Keywords: access tips input masks phone numbers
Post Reply

doubt in popup reminder Comment from simon @ 7/26/2009
Reminder popup how i can create in MSAccess, could pls send an example to my email id. Actually i want to know when the expiry date of my passport should be inform me 30 days before from the database
Show Just This Thread        Post Reply

Add Your Comments or Subscribe
 
If you just want to subscribe to get email updates when the News is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
 
  Your Name:  Required
  Your Email:  NOT Public
  Subject:
  Comments:

 

Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 5+5:
  
  Notify me when the News is updated.
  Remember Me for my next comments
  
 
 
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard

 

 

You may want to read these articles from the 599CD News:

8/17/2018Access Dev 10 is ONLINE
8/15/2018Access Tip: Search Form
8/15/2018Access Tip: Locked v. Enabled
8/15/2018Access Dev 9 is ONLINE
7/31/2018Microsoft Access Developer 8
3/23/2018Microsoft Access Developer 7
2/22/2018Microsoft Access Developer 6
2/22/2018Access Assistance Available
2/21/2018Putting Access Databases Online
2/18/2018Microsoft Access Developer 5
 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP