The Microsoft Masked Edit control only allows input that matchesthe mask. Similarly, you can only set the Text property to a stringthat matches the mask. If you have a mask for a phone number thatonly allows numbers (#), you cannot set the text to blanks. Aneasy way to set the text to blank is with this code:
vTemp = mskPhone.MaskmskPhone.Mask = ""mskPhone.Text = ""mskPhone.Mask = vTemp
Removing the mask allows you to set the text to any appropriatestring. Restore the mask afterwards. I use this code in the validationevent of a data control when adding a new record.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
























