Listbox questions

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a few questions regarding Listbox;

1. How can I fill Listbox from an access table with multiple columns?

2. How can I return the user selected (highlighted) items in a Listbox
individually?

3. How can I remove user selected (highlighted) items from a Listbox?

Thanks

Regards
 
John,

As I see that you use it binded
I have a few questions regarding Listbox;

1. How can I fill Listbox from an access table with multiple columns?
You can only fill the display member and valuemember see my other answer on
this question.
2. How can I return the user selected (highlighted) items in a Listbox
individually?
Use theselected items
3. How can I remove user selected (highlighted) items from a Listbox?
You have to delete them from your datasource
 
Hi

I have a few questions regarding Listbox;

Assume your listbox's name is "listbox1".
1. How can I fill Listbox from an access table with multiple columns?

"listbox1.items.add" depending on your display member and source.
2. How can I return the user selected (highlighted) items in a Listbox
individually?
"listbox1.selecteditem.tostring"

3. How can I remove user selected (highlighted) items from a Listbox?

"listbox1.items.remove(listbox1.selecteditem)" or
"listbox1.items.removeAt(listbox1.selectedindex)"
 
If more than one item are selected, how can I return all of them? is there
an indexed method that does that?

Thanks

Regards
 
If more than one item are selected, how can I return all of them? is there
an indexed method that does that?

Thanks

Regards

First set listbox's selection mode to "multiSimple" mode then:

For Each items As String In ListBox1.SelectedItems

' Add / insert multi items where you want

Next
 
Back
Top