Listbox rowsource maximum length

Nwalach

Registered User.
Local time
Today, 07:58
Joined
Jun 2, 2003
Messages
12
When running some overly general searches I repeatedly get an error that my RowSource property string is too long. Does anyone know the maximum length for this property?

Better yet, does anyone have any clever way of fooling it into not existing?

Cheers,
Nick
 
The rowsource property supports up to 2048 characters. I believe if you use a SQL string for the rowsource, the results of that SQL string won't be subject to that limit.

The best way of circumventing the 2048 character limit is to use a list-filling callback function to fill the rowsource. I'm not too familiar with the technique, but it's outlined in my Access 2000 Developer's Handbook (by Ken Getz, Paul Litwin, and Mike Gilbert) and also in Access Cookbook by some of the same authors. I tried doing a search of the forum, but didn't turn up anything.
 
I found a bunch on callback functions, but all of it is about filling the listbox with pre-existing lists (ie directory contents)... does anyone know if I can just have the callback function parse the string I've been using as the rowsource and somehow use that to fill in my columns? I can't think of any other way to do this that wouldn't make my search take twice as long.

Thanks
Nick
 

Users who are viewing this thread

Back
Top Bottom