++ List Box - Data Too Long?? ++

W

Wembly

Hi,

I have a List Box on the form that uses values list
populated by code.

I have been getting this error message and was wondering
if the sheer size of the list has anything to do with it.
Here's the runtime error: "Run-time error '2176' The
setting for this property is too long."

I checked the dsata contained in the variable which holds
the values prior to assigning it to the list box's row
source property, and it is very long. Could this be
causing this problem?

Thanks,
Wembly
 
T

Terry

Wembly,
Yes. If you are using a Value list, there is some
character limit to it. I encountered it once and it was
something like 1024 characters.
You are much better off setting your Row Source Type
to Table/Query and linking to a table with SQL to get
your Row Source.
Terry
 
G

Günter Brandstätter

Wembly,

if you really need to populate your listbox by code, you can use a user
defined function on the RowSourceType property of this listbox.
Just look in Access' help for this, there is a good example of how to do it.
Instead of selecting values list, you just type your function in the
RowSourceType property of the listbox.

hth
Günter
 

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