Clearing A ListBox?

  • Thread starter Thread starter Joe Delphi
  • Start date Start date
J

Joe Delphi

Anyone know how to clear the items in a ListBox?

I was hoping for something like ListBox.Clear but there doesn't appear to be
any such method.


JD
 
tembel said:
Subject: RE: Clearing A ListBox?

Isn't it like clearing a listbox in Delphi?

Not as far as I can tell from the MS Access Help files. In Delphi, the
ListBox has a .Clear method that allows you to clear all items in the list
at one time. Since MS Access does not offer this command, I was wondering
how other programmers handle this situation.

I know that there is a ListBox.RemoveItem method, but removing things one
item at a time seems sort of klutzy to me.

JD
 
Joe Delphi wrote in message said:
Not as far as I can tell from the MS Access Help files. In Delphi, the
ListBox has a .Clear method that allows you to clear all items in the list
at one time. Since MS Access does not offer this command, I was wondering
how other programmers handle this situation.

I know that there is a ListBox.RemoveItem method, but removing things one
item at a time seems sort of klutzy to me.

JD

For a value list rowsource, you could set the rowsource to vbNullString
(a k a "").

me!lstMyList.rowsource=vbnullstring
 
Subject: RE: Clearing A ListBox?

Isn't it like clearing a listbox in Delphi?
 
Do you want to simply unselect all items selected within the listbox ???

R. Hicks
 

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

Back
Top