Highlighting Text in Field

P

PaulC

Good day,

How do I stop text from being highlighted in an access form field?

I would like to set it up so that when I press tab to move into the field it
brings me to the beginning of the field without highlighting any text already
in the field.

Hopefully that explains it ok.
 
P

PaulC

Awesome, that is terrific and this will probably work for us.

Is by chance a way to make only one field do this rather than everything in
the database?

Paul
 
R

Rick B

Yes, use code in the "on enter" event to set the position of the cursor.
Not sure of the exact syntax, but I have done it before. Do a search, it is
out here pretty often.
 
P

PaulC

That's great guys, thanks very much. I've learned three new ways of making
this work and that is terrific.

Thank you!
Paul
 
S

smilee8_28

I've tried this and it seemed to work, but it doesn't always work for me. The
control in question ( Call Notes) gets focus OnCurrent of the form. If I am
tabbing thru the form (because there are previous fields data entry users
fill in) and enter that control it works or if I use the navigation arrows to
go to the next form hence 'Call Notes' it works but if I go to the next form
via tabbing it doesn't work and still highlights the previously entered text
so that if the user hits the space bar the text is lost. Any ideas? I have
tried it with GotFocus and Enter, neither work.

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

Thanks, Kristine
 
Top