Newbies crimpy Posted October 30, 2000 Newbies Share Posted October 30, 2000 How can I set a Phone # Field to add spaces or - between the prefix, and first three numbers? Link to comment Share on other sites More sharing options...
Chuck Posted October 31, 2000 Share Posted October 31, 2000 quote: Originally posted by crimpy: How can I set a Phone # Field to add spaces or - between the prefix, and first three numbers? You need to have two field: one for data entry and one for the appearance. Let's say that you want to format a seven digit phone number with a dash between the third and fourth digit. The data input field is a text field called "Phone". Create a text calculation field called "Phone_Formatted" and set it to Left( Phone, 3 ) & "-" & Right( Phone, 4 ) This should work even if the user places the dash in themselves. If you need to cover area codes, obviously your calc will be a bit more complicated, but you probably get the idea. On the user interface side, place both the "Phone" and the "Phone_Formatted" fields in the same spot on the layout so that they cover each other. Bring the "Phone_Formatted" field to the front so that it is the one that is seen, but set its field formatting so that users can't enter the field. Set the "Phone" field so that users can enter the field. That way when the user clicks on the "Phone_Formatted" field, they actually enter the "Phone" field and can make their changes. Chuck Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8717 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now