Good point.
I had that in the test I made before posting, but removed it to simplify
the
solution. However, if the text box got focus by someone clicking in the
middle of the existing text, you're correct that it's necessary to set
SelStart to 0.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Sean said:
You may also add a Me.textName1.SelStart before, to ensure the cursor
is
at the start of the string, before selection; so:
Me.textName1.SelStart = 0
Me.textName1.SelLength = Len(Me.textName1 & vbNullString)
Sean
message
Me.textName1.SelLength = Len(Me.textName1 & vbNullString)
The reason for the vbNullString is to ensure no problems if textName1
contains Null.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
I would like to have all the text currently in a textBox be selected
when it
receives focus so the user can enter or change data easily.
I've tried: [textName1].selectAll
And: Me.textName1.selectAll
selectAll isn't it....
how would I do this?