enter text with a command button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a memo field whose properties are set to enter a new line on enter. I would like to put a button near the memo box on a form that would add a standard string of text and go to the next line every time the button is clicked. Any suggestions?
 
Jim said:
I have a memo field whose properties are set to enter a new line on
enter. I would like to put a button near the memo box on a form that would
add a standard string of text and go to the next line every time the button
is clicked. Any suggestions?

Me!MemoTextBox = Me!MemoTextBox & vbCrLf & "Some string"
 
=?Utf-8?B?Smlt?= said:
I have a memo field whose properties are set to enter a new line on enter. I
would like to put a button near the memo box on a form that would add a
standard string of text and go to the next line every time the button is
clicked. Any suggestions?

You can use some code like this:

Private Sub Command2_Click()
Me!txtNotes = Me!txtNotes & "This is the standard text." & vbCrLf
Me!txtNotes.SetFocus
Me!txtNotes.SelStart = Len(Me!txtNotes)
End Sub
 
Back
Top