Click here for AnswerPool.com Home page


Google

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Software    Another Microsoft Access Problem... Validation Rules

Moderators: Dwight
Go
Post
Find
Notify
Tools
Reply
  
  Login/Join 
Picture of Sarah51
Posted
I want to create a validation rule for the toll free telephone number field in my database to only allow numbers to be entered that start with 800, 888, 877, or 866. I have the field formatted to display phone numbers like this:

(555)555-5555

I tried a string using the "like" and "or like" features, but it didn't work. It either wouldn't let me enter numbers that it should have, or when changed, would start out at the number after the area code and wouldn't let me access the first three numbers.

Help! Confused
 
Posts: 408 | Location: VA, USA | Registered: 06-11-02Reply With QuoteEdit or Delete MessageReport This Post
Diamond Enthusiast

Picture of Peteeo
Posted Hide Post
This string worked for me..

Like "(800)???-????" Or Like "(866)???-????"
you'll need to add more 'or's to complete
all of the conditions you'd specified.

A better solution may be to create a look up table of valid toll free prefixes so that once you've packaged your data base you only need to update data rather than the validation rules.
 
Posts: 225 | Location: Vadnais Heights MN. | Registered: 06-15-02Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Software    Another Microsoft Access Problem... Validation Rules

© 2002-2008 AnswerPool.com



Visit DiscussionPool.com!