List box column limit?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list box that displays 8 columns. I tried to add more columns and
the list box doesn't display any information in the additional columns. Do
list boxes have a maximum number of useful columns? If so, is there a work
around?

Thanks,

David
 
4110 said:
I have a list box that displays 8 columns. I tried to add more
columns and the list box doesn't display any information in the
additional columns. Do list boxes have a maximum number of useful
columns? If so, is there a work around?

Did you add the columns to the RowSource query AND increase the ColumnCount
property? You have to do both.
 
If you base a listbox on a string only value, it has a max of about 4000
characters.

With 8 columns, say totalling to 100 characters, you down to only about 40
rows of data possbile.

However, if you base the listbox on table, you don't have that limitation.

You can also just "stuff" the sql right into the listbox. So, for the most
part, you don't need a string, or even a temp table.

If you REALLY MUST used generated data as opposed to sql with criteria, then
you can use a call back function, and the above 4000 chars limit don't
exist.

an example of how this works is here:

http://www.mvps.org/access/forms/frm0049.htm

So, you might consider using sql to fill your listbox, and not the "additem"
methoed of the listbox (which only works on strings, not a table).
 
Thanks guys,

I have done some more testing and have gotten the list box to honor more
columns so it isn't an Access limitation. In the list box I am displaying
Folder names from a path to provide document locations. I am using a separate
form with a series of combo boxes to select the folders. As each folder is
selected from a combo box, the next combo box is populated with the folder
names for that level that are compatable with the levels above. All of that
is converted into a sql statement that is crammed into the record source for
the list box on the first form. It works for about 6 levels then shows
nothing. I'll keep digging and if it isn't a simple typo eroor I'll let you
know.

David
 
Back
Top