How to set focus exactly in second line in text field

radek225

Registered User.
Local time
Today, 14:50
Joined
Apr 4, 2013
Messages
307
I found in this forum, how to set focus in first or last line, but I need set to second. Does anyone know how to do it?
 
That code only places the cursor in the position you wish to.. It does not select the line.. What is that you are exactly after.. If you could explain that in simple words we might be able to help you out..
 
You're right, I described it inappropriately.
I need place the cursor, exactly in second line in a textbox (event on click in button) .
 
I am guessing when you say second line, you mean after the Line break.. For example..
Code:
In this paragraph Text.

The cursor should be in the empty space between these two lines..
If that is the case, then change the code you have; like..
Code:
Private Sub cmdEditResponse_Click()
    Me.Response.Locked = False
    Me.Response.SetFocus
    pfPositionCursor Me.Response, [COLOR=Red][URL="http://www.techonthenet.com/access/functions/string/instr.php"][B]InStr([/B][/URL][B]Me.Response & "", vbCrLf)[/B][/COLOR]
End Sub
 
Now the cursor is the end of the first line. In your example - after dot in "In this paragraph Text."
 
Miles away after having the window open...

Thanks for jumping in Brian.. Glad you have it working radek225.. :)
 

Users who are viewing this thread

Back
Top Bottom