max length when using me!listbox.additem

J

Jesper

I'm inserting rows in a listbox with:
Me!listbox.additem string

The listbox has the maximum of 255 columns. The string is always 2000
characters.

The first first 14 rows insert just fine, but it fails when trying to insert
the 15th, with the error message
"The setting for this property is too long" code 2176. It breaks on this
line:
Me!listbox.additem string

Is there a maximum amount of data that a listbox can hold for each row or in
total in the listbox?
I'm aware of the ca. 65000 row limit, but I'm only at row 14.
Thanks for any input.

Jesper
 
D

Douglas J. Steele

AFAIK, the RowSource property has a limit of about 2000 characters, so I
don't understand why it's working for the first 14 if you're passing it 2000
characters each time!

You may have to resort to an alternative means of populating the listbox.
 
J

Jesper

AFAIK, the RowSource property has a limit of about 2000 characters, so I
don't understand why it's working for the first 14 if you're passing it
2000 characters each time!
You may have to resort to an alternative means of populating the listbox.

Thanks Doug.
After some testing it seems that the total length of the listbox (set to
Value List) cannot exceed ca. 32600 characters.
I'll have to work out something else then.
I'll post another question so everyone else can see it. Thanks again.

Jesper F, Denmark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top