How scroll to end of memo field textbox?

M

mscertified

I need to programatically position the textbox contents at the end. I tried
the following but it does not work. Any ideas?

Me!MyText.setfocus
Sendkeys "^{END}"

-David
 
D

Douglas J Steele

When a text box has focus, you can refer to its SelLength, SelStart and
SelText Properties.

The SelLength property specifies or determines the number of characters
selected in a text box or the text box portion of a combo box. The SelStart
property specifies or determines the starting point of the selected text or
the position of the insertion point if no text is selected. The SelText
property returns a string containing the selected text. If no text is
selected, the SelText property contains a Null value.

Try:

Me!MyText.setfocus
lngTextLength = Len(Me!MyText & "")
Me!MyText.SelStart = lngTextLength + 1
 
Top