-
I have a masked edit control bound to a database, say, for a second phone number. Not everyone has two phone numbers, so if we come to a record where this phone field is empty, the masked edit control does not clear, but keeps its previous value. What can I do to make it update each time the current record changes?
-
How are you switching between records, do you use a DataControl, a query, or with code.. If you are clicking on a button you could insert this code behind it. First clear the mask, then clear text, then assign the mask again. Ex.
Code:
MaskEdBox1.Mask = ""
MaskEdBox1.Text = ""
MaskEdBox1.Mask = "(###)###-####"
-
Thanks, it works great. I was trying to use the data control, but gave it up quickly because of its limitations.