How to display a BIG string in a textbox

jriano

Registered User.
Local time
Today, 17:00
Joined
Dec 9, 2003
Messages
45
Hello all, I have a little problem, hope you can help me.
I have a form that selects a recordset, and make some modifications to the db. When it can not modify a record, it saves in a string the record nunmber and the reason why it can not be updated. After the form ends its process, I want to display string in text box with scroll bars, but some times the string is so big that the text box can not handle it. Is there a way to make the text box be able to handle the string no matter how big it is? I don't want to use reports, even more, I think I would have the same problem, as it is a single string, and I would have to put it in a single textbox.
I am open to sugestions, if there is a better way to do this. Thanks
 
Could you make the text box several rows of text high and turn on the scroll bars property?

ken
 
Yes, I already did so. The problem is not that the string does not show. When the string is small everything is ok, but if it gets BIGGER, then the text box can not hold it.
 
Does it run off the right side of the text box? If so, won't the horiz. scroll bar let you view it?
 
The problem is not that the string does not show. It does, the scrollbar works ok, you can scroll down and see the rest of lines. But when the string is TOO BIG, I get a run time error message telling me that the setting for the property is too long.
 
Just how big does your string get? You may need another data type( before your string gets to the textbox)

???
ken
 
it depends on the selections you make, but it can get as big as 400 lines, and as the db grows, the likely is the string will grow too. I am thinking on creating a little table, and saving the message per record, and then run a report, I just did not want to do that, I would like the user to have all the information right there in the same form...
 
Last edited:
Can / did you try setting the string type to a memo data type?

(I would strongly suggest a log type table with time / date stamps, etc...)

???
ken
 
well, the problem is not the String data type. I just tested that. the problem is that the text property of the textbox can not handle very big strings...
 
Hum... I wonder if Pat or Mile or Rich may know what the limit of a text box is???
 
Rich, can you tell me a little more? I hadn't hear of a zoom box before....
 
What do you mean "Text Property", change the field to Memo in the table design
 
Rich, the textbox is unbound, it receives a string that contain messages put in there by a loop in vba that inspects the records. When a record can not be updated, another line (a message) is added to the string, stating why that record can not be modified. After running along all the records, the string may be a couple of hundret lines ( as it has a lot of messages acumulated). Then I assign that string to the textbox.text property
 
Rich, I think what is trying to do is this:

He runs tru a table using vba, making changes. When a change error occurs, he has a string that he concatenates this series of error type messages to, along with some other information. At the end of the process he wants to view the string in a text box but gets the error message he posted...

I think I am following this correctly...

ken
 
Never mind, Rich, I'll give you the honors...
 
Guys dont go to deep into what the form does. that does not matter. The fact is that I have an unbound text box in a form. I also have a String type variable which contents I want to assign to that text box. The string is very big, so when I try to assign
me.txtErrors.text=strErrorMessage
I get a run time error saying the setting of the property is too long.
So my question is: Is there a way to increase the number of characters a textbox can hold? or is there another control I can use?
 

Users who are viewing this thread

Back
Top Bottom