Expand cursor selection?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is just a little thing which is driving me nuts :-0

I have a Before Update procedure in my ID field, which checks to see if an
ID exists, and if not, I want the cursor to go back to the problem field and
select the entire field:

If intWSID = intWSID2 Then
'Ok, this workstation ID exists
Else
strMsg = MsgBox("This workstation ID does not exist; check the
Workstation ID reference.", vbOKOnly)

Cancel = True
End If

This code works pretty well, the cursor ends up back in the ID field, but
with the blinking cursor line at the end of the ID. Is there a way to have
the cursor select the entire ID?
 
Thank you John! I had tried using the SelLength property but did not realize
I needed to set the SelStart property first.

I ended up needing to set .SelStart = 0, then it actually selected the
entire field.

Thanks again
 
Back
Top