N
nigelb via AccessMonster.com
Ok, I have an interesting question about textboxes for anyone up for the
challenge...
I have a multi-line textbox containing text that the user can scroll through
with the vertical scroll bars. When the user clicks a command button, the
textbox loses focus (understandably).
Is there a way to set focus back to a textbox (after the user click a command
button) so that it clears text selection and it retains the same cursor and
scroll bar position before it lost focus?
My code is...
Private Sub txtLicense_GotFocus()
txtLicense.SelLength = 0
End Sub
This successfully sets focus back to the textbox and clears the text
selection, but the cursor position is returned back to the top at the first
character again (and so the previous cursor and scroll position is lost).
Any ideas?
challenge...
I have a multi-line textbox containing text that the user can scroll through
with the vertical scroll bars. When the user clicks a command button, the
textbox loses focus (understandably).
Is there a way to set focus back to a textbox (after the user click a command
button) so that it clears text selection and it retains the same cursor and
scroll bar position before it lost focus?
My code is...
Private Sub txtLicense_GotFocus()
txtLicense.SelLength = 0
End Sub
This successfully sets focus back to the textbox and clears the text
selection, but the cursor position is returned back to the top at the first
character again (and so the previous cursor and scroll position is lost).
Any ideas?