empty listbox

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

Guest

I have a listbox on a form which contains up to 50 items. It gets
repopulated many times. Currently I'm using .RemoveItem to empty the listbox
and then populate it with .AddItem which is time consuming.

I tried setting the listbox .Value to Null which didn't work. Is there a
more efficient way to empty the listbox?

Any help would be appreciated!
 
PeterM said:
I have a listbox on a form which contains up to 50 items. It gets
repopulated many times. Currently I'm using .RemoveItem to empty the
listbox and then populate it with .AddItem which is time consuming.

I tried setting the listbox .Value to Null which didn't work. Is
there a more efficient way to empty the listbox?

Any help would be appreciated!

Have you tried just setting its RowSource property to an empty string ;
e.g.,

Me!lstMyListBox.RowSource = ""

?
 

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

Similar Threads

removeitem in listbox 2
Access Cannot select items in listbox 1
Evaluate ListBox Value 8
Clear Listbox Entries 6
Deselecting items in a listbox 2
Faster DCount or Query 6
Refresh a listbox 1
Combobox to Listbox 4

Back
Top