cannot locate removeItem method on ListBox object in Access 2000

G

Garry

Hi!

I'm developing an Access 2000 form that contains a
listbox. I want to be able to remove an item from the
listbox when a user double clicks on that item.

I have all the logic working, however I can't see the
RemoveItem method from the list of ListBox methods.It
seems that there is no such method for the ListBox object
in this version of DAO.

I'm using DAO 3.6 and I've enabled it via the References
dialog.

Can somebody perhaps shed some light on this problem?

thanks in advance
- Garry
 
S

Sandra Daigle

Hi Garry,

Plain and simple - there is no RemoveItem method for the Access Listbox in
Access 2000. It is available in A2002. In A2000 and earlier you either have
to remove the item from the value list or remove or exclude it from the
results returned by the Rowsource query.

FWIW, the listbox is a member of the Access library - it is not part of DAO.
 
J

John S

From what I understand, you are SOL (...Otta Luck). Access 2000 does not
support the add item and the remove item methods for list or combo boxes
.. I think it has something to do with list boxes being bound to record
sources. From what I gather, the problem has not been entirely resolved in
Access2002 (you have the add and remove items methods, but can't use them).
This limitation must drive many a VB/Access programmer nuts (list boxes can
be very useful when making multiple selections),.

Now if you know a bit of V B, the easiest thing might be to develop a
separate app (which I did) and tie that into your Access database. Its an
awkward work around for a client. I use a stand alone VB application to
populate a table with streets selected for reporting. It works great, but
does not run from within Access forms etc..

John S.
Aylmer, Quebec Canada
 
J

John S

After my rant, I checked google for possible work arounds. There are various
possible approaches. The one i'm using (which I didn't find in google) is
to do all addition and deletion through a temporary table and SQL
operations, and then requery and reload the listboxes.

I was after two days able to do adds and deletes between two list boxes
(ie. add from one list box to another), but it involved a number of pain in
the ass work arounds.

John S.

Aylmer, PQ.
 

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