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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Mask Problem

Status
Not open for further replies.

cbd

Programmer
Apr 4, 2002
18
US
At the moment I am using an input mask on many of my forms to ensure that users enter data in the correct way. However users are complaining a lot because when they click on a box containing an input mask they have to ensure it is at the start of the box. Is it possible to force the cursor to begin at the start of the box, like when there is no input mask present?
 
Write a code to activate in the fields OnClick event.

Example where field is Text1:

Me.Text1.Setfocus
Me.Text1.SelStart = 0

This will set the selected field as focus and move the cursor to the beginning of the field in a flashing, ready to edit state.

This should solve your problem.

Let me know if it doesn't work for you.

Lisa [ponytails]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top