start a new line in a memo field

G

Guest

I have a memo control on a form that is populated from the contents of a
textbox control when the user clicks a cmd button. The user can make multiple
entries and each entry is added to the memo concatenated with the previous
contents of the memo as follows:
me.memo = me.memo & me.Textbox

I would like the program to perform a carriage return and begin a new line
in the memo box before each addition. I tried using the sendkeys method as
follows but it does something strange and fills the memobox with endless
repeats of the textbox field:

me.memo = me.memo & me.Textbox
sendKeys "{Enter}"

what am I doing wrong and is there a better way to go about doing this?
Thanks.
 
F

fredg

I have a memo control on a form that is populated from the contents of a
textbox control when the user clicks a cmd button. The user can make multiple
entries and each entry is added to the memo concatenated with the previous
contents of the memo as follows:
me.memo = me.memo & me.Textbox

I would like the program to perform a carriage return and begin a new line
in the memo box before each addition. I tried using the sendkeys method as
follows but it does something strange and fills the memobox with endless
repeats of the textbox field:

me.memo = me.memo & me.Textbox
sendKeys "{Enter}"

what am I doing wrong and is there a better way to go about doing this?
Thanks.

me.memo = me.memo & vbCrLf & me.Textbox
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top