Link to home
Start Free TrialLog in
Avatar of bfeddish
bfeddishFlag for United States of America

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?
Avatar of priya_pbk
priya_pbk

Instead of stuffing in a text Box, why don't you try writing it in another maskedit box with the same format.

So when you save it, wont that help.

-priya


Avatar of bfeddish

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

Regular text box.
ASKER CERTIFIED SOLUTION
Avatar of priya_pbk
priya_pbk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

That was it!

Thanks!