October 30, 200025 yr Newbies How can I set a Phone # Field to add spaces or - between the prefix, and first three numbers?
October 31, 200025 yr 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
Create an account or sign in to comment