Expand cursor selection?

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?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top