Newbies PhilippeH Posted June 30, 2002 Newbies Posted June 30, 2002 I search a way to format automatiquely phone numbers. I mean user enter 0102345678 in the field, after he leave the field the value is displayed ass 01 02 34 56 78 (but if possible without change of the value put in the field 0102345678, then when user need to edit this field, he will get 0102345678 to modify). Thanks every one
RussBaker Posted June 30, 2002 Posted June 30, 2002 Have 2 fields, 1 a text field "NumberInput" and the other a calculation text field "NumberDisplay" where NumberDisplay = If(IsEmpty(NumberInput),"Enter a 10 digit phone number",Left(NumberInput,2) & " " & Middle(NumberInput,3,2) & " " & Middle(NumberInput,5,2) & " " & Middle(NumberInput,7,2) & " " & Right(NumberInput,2)) You should have NumberInput validated by a calculation Length(NumberInput) = 10 to make sure that users enter 10 digits. Now, fill both fields with white, format NumberDisplay not to allow user entry and bring it to the front, and exactly on top of, NumberInput. The user will now see the message "Enter a 10 digit phone number" in the field. When they click on the field, NumberInput will come to the front, and when they enter a number and leave the field, Number Display will be at the front, displaying the formatted number.
Recommended Posts
This topic is 8253 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