June 30, 200223 yr Newbies 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
June 30, 200223 yr 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.
Create an account or sign in to comment