Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Thanked 0 Times in 0 Posts

    Delete selected item from listbox (access 97)

    I have a listbox along with a "deselect " button , when the user has selected an item on the list and presses
    deselect button i want to remove the selected item from the list...
    Actually i am looking for substitute of Removeitem method of VB as access does'nt support this method
    This is urgent ...please help somebody

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Delete selected item from listbox (access 97)

    How did you populate the listbox in the first place? Is it based on a table, a query, a callback, a values list, a field list or what?

    You can do things with listboxes in Access that VB programmers can only dream of, but if you want a RemoveItem equivalent, you're going to have to program it. You can't get a definitive answer until we know exactly what you're trying to do.

    One benefit of lists in Access over VB is that you have a built in SelectedItems collection when you turn on the Multiselect property of the listbox. That means you don't *have* to remove anything from the list, you can simply deal with the items selected instead. Another is that the secondary array is populated automatically, so you can use ItemData without having to explicitly create it in code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts