how do you use vba to place an new line (enter) in a textbox

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

Guest

I am working on a project where I am listing 4 catagories and notes attached
to these catagories in a text box. I have the catagories and notes
displaying in the box but I want each one to be on it's own line and I can
not find any referances on how to include the "Enter" keystroke in my code.
This is the current code I am using:

Me![NOTES] = "EQUIPMENT: " & Me.SOLDTOID.Column(8) & " INGREDIENTS: "
& Me.SOLDTOID.Column(9) & " PACKAGING: " & Me.SOLDTOID.Column(10) & "
SUPPLIES: " & Me.SOLDTOID.Column(11)

I want the enter to be between each of the catagories like this:

Me![NOTES] = "EQUIPMENT: " & Me.SOLDTOID.Column(8) & ENTER & "INGREDIENTS:
" & Me.SOLDTOID.Column(9) & ENTER & "PACKAGING: " &
Me.SOLDTOID.Column(10) & ENTER & "SUPPLIES: " & Me.SOLDTOID.Column(11)

I tried this exact code and it didn't work. Any help would be appreciated.
Thank you in advance.
 
Here's an example I posted in response to a similar question just yesterday
....

You can use either a label or a text box. Here's an example that does both
....

Private Sub Command7_Click()

Me.Label0.Caption = Me.Text3 & vbCrLf & Me.Text5 & vbCrLf & Me.Text6
Me.Text1.Value = Me.Text3 & vbCrLf & Me.Text5 & vbCrLf & Me.Text6 &
vbCrLf

End Sub
 

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

Back
Top