If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Can't clear masked edit control - VB.Net

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-03, 11:42
SteveH SteveH is offline
Registered User
 
Join Date: Apr 2002
Location: Illinois
Posts: 133
Can't clear masked edit control - VB.Net

I posted this in the VB forum but haven't gotten an answer that works yet. I hope I fine a VB.Net person here.

I have an unbound masked edit control with a mask for a social security number. I had code in the click event of a button to clear the SSN but it would only work the first time the button was clicked.

This is the line of code I used:

Me.MaskedEdit1.Text = " / / " (3 spaces, 2 spaces, 4 spaces)

Also tried:
Me.MaskedEdit1.Text = " / / " (same spaces)
Me.MaskedEdit1.Mask = "###/##/####"

And:
Me.MaskedEdit1.Mask = "###/##/####"
Me.MaskedEdit1.Text = " / / " (same spaces)

And:
Me.MaskedEdit1.Text = ""
Me.MaskedEdit1.Mask = "###/##/####"

Any ideas?


Thanks
__________________
SteveH
Reply With Quote
  #2 (permalink)  
Old 06-06-04, 18:13
KristynS KristynS is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
Cool

Hey Steve,

I have the same problem with a masked Edit Control for entering a phone number. I have been frantically searching for a fix, but I could not find one. I came up with a workaround.

I set the .Mask = " "
then the .SelText = " "
then reset the .Mask = "(###)###-####"
here is my code

mskPhone is the name of the Masked Edit TextBox

mskPhone.Mask = " "
mskPhone.SelText = " "
mskPhone.Mask = "(###)###-####"


I hope this helps
Thanks,
Kristyn
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On