Todd MacPherson
asked on
Textbox - how do I include line breaks in the default value to a text box
Hi
I have a textbox and its enter key behavior is set to new line. I want to set the default value to have a line break as follows:
1234 Bill
3435 Steve
7788 John
It is going to a memo field in the db. It works fine for user entry into the text box but the client wants a default value as above to save keying in every time. How do I do this? Currently the default value runs together.
Thanks
PBLack
I have a textbox and its enter key behavior is set to new line. I want to set the default value to have a line break as follows:
1234 Bill
3435 Steve
7788 John
It is going to a memo field in the db. It works fine for user entry into the text box but the client wants a default value as above to save keying in every time. How do I do this? Currently the default value runs together.
Thanks
PBLack
ASKER
hi
I can not get it to work
it just puts #Name? into the textbox
I can not get it to work
it just puts #Name? into the textbox
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Here is what I did. I just put Me.MyTextbox = "1234 Bill" & vbcrlf & "3435 Steve" & vbcrlf & "7788 John"
That works and if I am calling from existing data in a table then it overwrites this. Works for me.
That works and if I am calling from existing data in a table then it overwrites this. Works for me.
ASKER
full marks for attempt
I see you already have an answer and closed the question.. but just a FYI anyway.. You can use Chr(10) & Chr(13) for a line break in your default value.
"1234 Bill" & Chr(13) & Chr(10) & "3435 Steve" & Chr(13) & Chr(10) & "7788 John"
"1234 Bill" & Chr(13) & Chr(10) & "3435 Steve" & Chr(13) & Chr(10) & "7788 John"
ASKER
thanks shaydie
much appreciated
much appreciated
Me.MyTextbox.DefaultValue = "1234 Bill" & vbcrlf & "3435 Steve" & vbcrlf & "7788 John"