Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing text in MaskEdit Control 1

Status
Not open for further replies.

anet

Programmer
Jul 10, 2001
35
CA
How do I reset the text in a MaskEdit control back to the mask? I have a form to enter a new customer and after the save has been successful a function clears all the text boxes ready for the next entry.

I tried just coding mskPhoneNumber.Mask = "###-####" but it stills leaves in the previous customer's phone number.

What step am I missing? Thanks.
 
Try this

Code:
mskPhoneNumber.Mask = "" 
mskPhoneNumber.Text = "" 
mskPhoneNumber.Mask = "###-####"
Let me know if this helps

If you are worried about posting, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
There is one more way to accomplish this:

Dim blnPromptInclude As Boolean

blnPromptInclude = mskPhoneNumber.PromptInclude
mskPhoneNumber.PromptInclude = False
mskPhoneNumber.Text = mskPhoneNumber.Mask
mskPhoneNumber.PromptInclude = blnPromptInclude


Vlad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top