Listbox ListCount issue

G

Guest

I have a listbox that I manually populate. I've reached the limit of how many
entries I can have (about 540) in the listbox, and get an error (property too
long). Okay, well and good. So to clean up, I do a series of "removeitem"
commands. However, the LISTCOUNT is not getting reset to 0. So that when I
try to repopulate the listbox, I immediately generate the error again.

This aoppears to be happeneing even if I close and reopen the application.

What do I need to do in order to cleanly remove the items?

(Access 2002)

Thanks!
 
D

Douglas J Steele

Rather than using removeitem, try setting the row source to a null string:

Me!MyListBox.RowSource = vbNullString
 
J

Jeff Boyce

Dennis

You've described "how" (manually populating a listbox) you are trying to
solve an issue. What's the issue? There may be other ways to get done what
you need to...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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