carriage returns

G

GeorgeJ

I have a listbox on a form that has a button on it that
will transfer the selected info (ex: the States) from the
listbox to a textbox on another form. But, there are many
times when the user will need to go to a new line in the
text box to add another state. How or what is the line
that can be attached to the button with the listbox that
will produce the new line in the textbox? I am aware of
the & vbCrLF & but cannot place it to get it to work.
Has anyone needed to do this and how was it done?
Any response is appreciated.
 
M

Marshall Barton

GeorgeJ said:
I have a listbox on a form that has a button on it that
will transfer the selected info (ex: the States) from the
listbox to a textbox on another form. But, there are many
times when the user will need to go to a new line in the
text box to add another state. How or what is the line
that can be attached to the button with the listbox that
will produce the new line in the textbox? I am aware of
the & vbCrLF & but cannot place it to get it to work.
Has anyone needed to do this and how was it done?

vbCrLf is a VBA constant, it is not available in the
control or SQL expression environment.

Use Chr(13) & Chr(10) instead.
 

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