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

P

pokdbz

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.
 
R

Rick B

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.
 
J

James A. Fortune

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
 
Top