Novice question 2

I

Ig

I have field for telephone number with mask
\(000") "000\-0000;0;" "
So user see (999)999-9999.
I want when user enters this field with mouse, to position cursor
automatically
on the first symbol. How it can be accomplished?
Thanks
 
W

Wayne Morgan

I tried this to see which event would be needed. The GotFocus and Enter
events didn't work. The mouse click took precedence and moved the cursor, so
I used the textbox's Click event instead.

Me.Text2.SelStart = 1
Me.Text2.SelLength = 1
 
I

Ig

Thanks Wayne

Wayne Morgan said:
I tried this to see which event would be needed. The GotFocus and Enter
events didn't work. The mouse click took precedence and moved the cursor,
so I used the textbox's Click event instead.

Me.Text2.SelStart = 1
Me.Text2.SelLength = 1
 

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

Top