Go to end of a memo field

Idjit

Clamoring Preschooler
Local time
Today, 03:43
Joined
Apr 18, 2002
Messages
216
I'm sure this is a simple one, but can't find exactly what I need. I have a memo field on my forms. What I want is this: when the user clicks on the field to record notes, if there is already text in the field I want the cursor to automatically go to the end of the text so they can easily append the new note to the old. I saw the recent post about appending new notes to a hidden memo field, but I want the user to be able to see the notes that may already be there.

Thanks!
 
On the Memo field's OnClick event put.....

If Not IsNull([MemoFieldName) Then
Dim x As Integer
x = Len([MemoFieldName])
[MemoFieldName].SelStart = x
End If

Also, might be a good idea to put on the Memo's OnEnter Event for anyone who uses the tab or enter keys rather than the mouse.

Could be irritating for those who want to edit the existing text as they'll have to navigate with the keyboard to get the cursor where they want it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom