Thanks Ken, that is perfect. Exactly what I needed.
--
Richard
"Ken Sheridan" wrote:
> Richard:
>
> You can put the following in the control's GotFocus event procedure:
>
> Dim ctrl As Control
>
> Set ctrl = Me.ActiveControl
> ctrl.SelLength = 0
> ctrl.SelStart = 0
>
> It will work fine if you navigate to the control with the keyboard, but if
> you click into the control with the mouse the insertion point will be
> wherever in the control you click, not at the start. You could overcome this
> by repeating the code in the control's MouseUp event procedure to force the
> insertion point back to the start after clicking. However, this would have
> the drawback that you could not click into the middle of an existing value in
> the control if, for instance, you want to edit it; you'd have to use the
> keyboard to move the insertion point from the start position.
>
> Ken Sheridan
> Stafford, England
>
> "Richard" wrote:
>
> > I am using Windows XP and Access 2000. I have a form which has a date field
> > with an input mask 00/00/0000;0;_
> >
> > When this field is clicked or tabbed into, I need the cursor to always go to
> > the first character.
> >
> > Can this be done?
> >
> > Many thanks in advance.
> > --
> > Richard
>
|