Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time 2176 - Settings for property too long 1

Status
Not open for further replies.

squirleegirl

Programmer
Jun 24, 2003
59
US
Anybody have any suggestions about a Run-Time 2176 - The setting for this property is too long error?

I've got a drop-down box that users pick a test from. They click the submit button and the results of the test show in the text box. The results are in a plain text file to begin with. Works fine for most of the text files, but a few are larger than others and it is on those that I get this error.

Here is the code
Text217.SetFocus
filenumber = FreeFile
Open "my file.txt" For Input As filenumber
length = LOF(filenumber)
Text217.Text = Input$(length, filenumber)

The last line is the line that gets flagged if I choose to debug.

Thanks in advance for your help!
Squirleegirl

 
Are you using a Memo field as the control source for the text box?
 
No. Actually, the combo box values are generated from a query which then puts the value of the combo box into the open file stmt to know which text file to get.
 
If I remember right, if Text217.Text is not based on a memo field, you won't be able to write more than 255 bytes to it. If it is based on a memo field, you can write 65,000 bytes.
 
Thanks for the info. I'm not sure what to do about it now, but at least I know what I'm doing will not continue to work!

Thanks again.....
Squirleegirl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top