How to show ***-**-****

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box with this 000\-00\-0000;;* as the input mask. When the
form is opened nothing is showing in the text box. I would like ***-**-****
to be in the text box. But only when I click on the text box it brings up
***-**-****. I tried to set the focus on the text box and that didn't work
just has a blinking cursor.

So is there a way to show ***-**-**** as the input mask in the text box
without clicking on it.
 
This same question was posed on the 16th and 19th in the Forms coding
newsgroup. Go check out the responses there. Doug Steele, a very
knowledgeable MVP, stated that he does not think it is possible.
 
pokdbz said:
I have a text box with this 000\-00\-0000;;* as the input mask. When the
form is opened nothing is showing in the text box. I would like ***-**-****
to be in the text box. But only when I click on the text box it brings up
***-**-****. I tried to set the focus on the text box and that didn't work
just has a blinking cursor.

So is there a way to show ***-**-**** as the input mask in the text box
without clicking on it.

I tried:

Private Sub Form_Load()
txtField.SetFocus
txtField.SelStart = 0
End Sub

It seemed to do what you want.

James A. Fortune
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top