bfeddish
asked on
Stuffing a formated field
I have a phone number field on a page with the custom format of (@@@) @@@-@@@@. It works fine when reading the data from the database. For instance if I have 5551231234 in the database then (555) 123-1234 is displayed. The problem is when I "stuff" the field with data. If I say txtMyPhone.text = "5551231234" then the text field just displays 5551231234 until I exit and come back into the form. If I stuff it with (555) 123-1234 then it displays properly until I exit the form and come back in. In which case I get something like ((55)5) -123-12. How can I stuff the field and have it immediatly formated via the current fields format properties?
ASKER
After the user exits the field with a 7 digit number I put in the area code automatically and and I want the field to display to the user properly right after they exit the field.
Bryan
What particular edit control are you using. The one I'm using won't take anything that isn't already formatted.
eeevans
eeevans
ASKER
Regular text box.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it!
Thanks!
So when you save it, wont that help.
-priya