Start cursor at end of text

G

Guest

(I already asked this but can't find my question. Sorry.)

I have set the focus to a text box OnCurrent of my form. I have used the
following to have the cursor start at the end of the text:

Private Sub Call_Notes_Enter()
With Me.Call_Notes
.SetFocus
.SelLength = 1
.SelStart = Len(.Text)
End With
End Sub

This works except when the user tabs from one record to the next, then all
the text is highlighted making it very easy to accidentally delete or alter
that text. It does work if the user tabs to the field within the form or if
using the navigation arrows to go from one record to another, but not if they
tab to the end of one record, continue tabbing into the next record, which is
what they will do most often.

Thanks for your help,
Kristine
 
G

Guest

In the tool bar select > Tools > Option > Key Board > Chenge the setting of
the Field behavior when input, from select the all field to move to the end
of the field.
 
G

Guest

Neither using GotFocus or changing the options changed anything but it looks
like even though all the text is highlighted initially, as soon as the user
types it puts them at the end of the text which is not ideal but atleast
avoids any serious problems. Thanks for your time!
 

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