Expand cursor selection?

  • Follow


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?

-- 
Thanks - Terri
0
Reply Utf 4/16/2007 11:02:06 PM

On Mon, 16 Apr 2007 16:02:06 -0700, Terri <terri@discussions.microsoft.com>
wrote:

> Is there a way to have 
>the cursor select the entire ID?

controlname.SelStart = 1
controlname.SelLength = Len(controlname)

             John W. Vinson [MVP]
0
Reply John 4/17/2007 1:59:00 AM


1 Replies
138 Views

(page loaded in 0.075 seconds)


Reply: