Getting listBox value after selecting a new row

timothyd

Registered User.
Local time
Today, 17:43
Joined
Feb 9, 2010
Messages
41
Hello,

I have a multi select listbox in which I am trying to get the value of the listbox after I select or deselect a value. Normally, I would think that after you select or deselect a row in a listbox, the value would change to that row, but it doesn't seem to be doing that. Am I wrong in thinking that?

If I am, I need to know how you can get the value of the listbox to change to the row that was just selected or deselected, that way I can do different things with the rest of the form based on that. If I have to use the index of the listbox, I am alright with that. I just need to know how to get the value to change. Thanks!!
 
A multi-select listbox's value will ALWAYS be NULL. To get the items selected you have to iterate through the ItemsSelected collection.
 
Thanks. good to know.

I did find a solution.

Code:
Me.Student_List.Value = Me.Student_List.Column(0, Me.Student_List.listIndex)

It works, so I am happy.
 

Users who are viewing this thread

Back
Top Bottom