jtwilber Posted May 16, 2003 Posted May 16, 2003 How do I get my 10 digit string of number to insert the (###)###-#### format?
Lee Smith Posted May 16, 2003 Posted May 16, 2003 Hi jtwilber, "(" & Left(Abs(TextToNum(PhoneRaw)),3) & ") " & Middle(Abs(TextToNum(PhoneRaw)),4,3) & "-" & Right(Abs(TextToNum(PhoneRaw)),4) Replace "PhoneRaw" with your field name where the phone number is now. Lee
jtwilber Posted May 16, 2003 Author Posted May 16, 2003 Ok now be gentle with me, I'm totally new. Am I displaying two fields in the layout??? or is this a script in the phone field... explain in dummy terms and I'll be forever indebted. Thank you Lee. JWilber
Lee Smith Posted May 16, 2003 Posted May 16, 2003 Hi JWilber, You need two fields: One of the fields is where you enter the raw number, and the other is a calculation field that will create the format you want. PhoneRaw number cPhone Calculation, text result, = "(" & Left(Abs(TextToNum(PhoneRaw)),3) & ") " & Middle(Abs(TextToNum(PhoneRaw)),4,3) & "-" & Right(Abs(TextToNum(PhoneRaw)),4) Note: substitute your field name or names for any fields you already have. HTH Lee
SteveB Posted May 16, 2003 Posted May 16, 2003 Put the calculation field on top of the data entry field, and set its field format to Not Allow Enty (right click, then Field Format. Line the fields up precisely (same size, type face, etc). Make sure to take the top field (the calc) out of the tab order. When the user clicks in the field, the bottom data entry becomes active, but when the user is out of the field, the formatted # will be displayed. Steve
jtwilber Posted May 16, 2003 Author Posted May 16, 2003 Thanks Lee... I understand but it sure seems odd that you can not just put a mask (like Access) over a single field for formating. If this is the case do you use the two fields and the formula above in your own work or just accept unformated phone numbers.
Lee Smith Posted May 16, 2003 Posted May 16, 2003 Steve just told you how to do this, if you need more information, ask away. Lee
jtwilber Posted May 16, 2003 Author Posted May 16, 2003 WOW, you guys are my new best friends and you don't even have to send birthday presents! That was great. Thank you.
Ugo DI LUCA Posted May 16, 2003 Posted May 16, 2003 Hi, There is also a pretty cool file to make your own phone masks, available at fmfiles.com. Really useful when you're dealing with multiple phone masks...
jtwilber Posted May 17, 2003 Author Posted May 17, 2003 Thanks. Very helpful. Any other sites out there that could prove invaluable to me as I ramp up. Also, do are fm developers making $ or starving.
Recommended Posts
This topic is 7848 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