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

Input Mask & Overtype Problem

Status
Not open for further replies.

Kennmi

Programmer
Jun 16, 2002
5
US
I have an input mask applied to a field and I understand that Access applies an "overtype" mode to the field. The users are use to clicking in a form field and the cursor automatically starting fromt the righ or left regardless of where they clicked in the field. With the "overtype", the user clicks anywhere in the field and the cursor starts at that position. Even if they follow the correct input mask, it gives an error becuase they started at the wrong position for the input mask.

Is there a way to either override the "overtype" mode for the field or automotically reposition the cursor regardless of where they clicked with in the field?

 
Try putting this code into the On Click event of the field:

Code:
Private Sub Date1_Click()
    SendKeys ("{Home}")
End Sub

This forces the cursor to the start of the field if the user clicks into it with the mouse; if they use the Tab key to go into the field, this code is not triggered.


Bob Stubbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top