[AccessD] Deselect all items from a multi-Select list box

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Fri Apr 4 09:45:46 CST 2003


Ooh. Ooh.  I know this one:

    Dim varValue As Variant

    For Each varValue In lstOrders.ItemsSelected
        lstOrders.Selected(varValue) = False
    Next varValue

    lstOrders.Requery
    strList = ""

    Me.Repaint

Not sure you need the lstOrders.Requery.  strList is where I'm holding the
list of items selected for another purpose.  It gets updated in the
AfterUpdate event of the multi-select list box.

HTH

Rocky Smolin
Beach Access Software

----- Original Message -----
From: "Gary" <gjgiever at yahoo.com>
To: <accessd at databaseadvisors.com>
Sent: Friday, April 04, 2003 7:25 AM
Subject: [AccessD] Deselect all items from a multi-Select list box


> I'm using Access97 on Windows XP.  I have developed a
> simple application to track which tables are used by
> various applications that I have developed.  The main
> form has a multi-select listbox with all the tables.
> The main form is bound to the table with all the
> applications.  I select all the appropriate tables for
> the application in the listbox then a command button
> adds all the selected tables to a third table that
> lists all the tables for each application.
>
> My problem is that when i navigate to another
> application all the tables that I selected for the
> previous application are still selected.  I can go
> through and manually deselt each item or close the
> form and reopen it.  There must be an easier and more
> elegant way to clear the listbox.  I researched this
> and found one other person who asked this question but
> no one replied.  It seems like it should be easy to
> do.
>
> Gary J. Giever, MA
> ACCMHS
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list