How to make a new line on a read only box when clicking a button

Sean_Downes

New member
Joined
Jun 6, 2012
Messages
3
Programming Experience
Beginner
Previous to my last thread. Also on my Form1 page i have the button to open a form 'Create New CHS' next to this is a read only box. Everytime i click the 'Create New CHS' it types for me 'DateTime.Now New CHS Incident Created'. However every other time i press it, it deletes the previous one and replaces the time with the current time from when i pressed it again.

How do i make a new line, so when i press it the first time, its on the top row, the second time its on the next row and so on and so fourth.

Thanks
 
If you want to add some new text to the current text then that's exactly what you have to do: get the current text and add some new text to it. Presumably you are simply replacing the old text with the new. We can only guess that that's what you're doing wrong though, because you haven't actually shown us what you're doing.
 
Don't know what exactly a Read-Only box is, but assuming it's a read-only TEXTBOX, make sure you have written
readonlybox.text &= cstr(datetime.now & " New CHS Incident Created" & vbcrlf)
and not just
readonlybox.text = cstr(datetime.now & " New CHS Incident Created" & vbcrlf)
or however you have written :p

Anyway, to add a new line, write & VbCrLf where you want the line to be added :)

Hope this helps! :)

//NoIdeas
 
Back
Top