Select text in Access like Visual Basic (1 Viewer)

Talismanic

Registered User.
Local time
Today, 07:14
Joined
May 25, 2000
Messages
377
I am trying to get the text in a control to be selected when the user enters the box so that the user can enter a new number without deleting the text allready in the box.

Here is the code:

Private Sub txtEmployeeNumber_GotFocus()
txtEmployeeNumber.SelStart = 0
txtEmployeeNumber.SelLength = Len(txtEmployeeNumber.Text)
End Sub

This should work but it isn't. I am using this in a combo box, could that be the problem. If so, how do I do this?
 

Talismanic

Registered User.
Local time
Today, 07:14
Joined
May 25, 2000
Messages
377
It is set that way and it does do it on the form load and open but I want it to do it every time the control gets focus.
 

Users who are viewing this thread

Top Bottom