Select the entire field.

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Let me clarify my question,
In most of the fields when I click on it, it should not
select the entire field.
Only one field, when I click on it I want the entire field
to be selected, so I will override the old information.
Please help
Thanks
Joe
 
Joe said:
Let me clarify my question,
In most of the fields when I click on it, it should not
select the entire field.
Only one field, when I click on it I want the entire field
to be selected, so I will override the old information.
Please help
Thanks
Joe

I'd use the control's GotFocus event. Here's air code:

Private Sub txtMyTextBox_GotFocus()

With Me!txtMyTextBox
.SelStart = 0
.SelLength = Len(.Text)
End With

End Sub
 
Back
Top