Hi everyone - this may seem to you all a very basic problem but I have spent hours scoring the texts to get an answer without success.
I want to display a value on a form in a text box for each iteration of some code such that I build up a list ie without overwriting on each iteration and for the life of me - I cant see how.
IE me.textbox2.text = "hello" say and me.textbox2.text = "how are you"
I want to see in the text box (or something similar) hello and on the next line how are you.
Help me please!!!!
Thank you
Comments
: have spent hours scoring the texts to get an answer without success.
: I want to display a value on a form in a text box for each iteration
: of some code such that I build up a list ie without overwriting on
: each iteration and for the life of me - I cant see how.
: IE me.textbox2.text = "hello" say and me.textbox2.text = "how are
: you"
: I want to see in the text box (or something similar) hello and on
: the next line how are you.
: Help me please!!!!
: Thank you
Ok...
I do not know exactly what you are doing but this may help.
Make sure that your textbox has the option MultiLine set for true (Me.Text2.MultiLine = true) and this will work.
Everytime you add a new line of answer, do this:
Me.Text2.Text = Me.Text2.Text & vbCr & vbLf & "Your Text Here"
That will concatinate the answer onto the end of the string in your textbox and it will add in the Carrage return in between the old string and whats added on.
Hope that helps,
Sean
My program is writing a line of text each time it goes through a loop (could be 1000 times) and I want to show on my form one under the other the line of text. A text box seems the obvious way to do it but how - me.textbox1.text over writes what was there before.
Thanks again
: My program is writing a line of text each time it goes through a loop (could be 1000 times) and I want to show on my form one under the other the line of text. A text box seems the obvious way to do it but how - me.textbox1.text over writes what was there before.
Yes, but if you include me.textbox1.text in the new value like Sean said, your textbox will accumulate one line after another
me.textbox1.text = me.textbox1.text & vbCrLf & "new text"
[size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
[code]
$ select * from users where clue > 0
no rows returned
[/code]
I always did it the longer way, vbCr&vbLf
Regards
:
: Regards
:
Though if you are correct about a thousand lines, it might become pretty annoying, no matter what control you use... Another problem to solve ;-)
Greets...
Richard