toom
04-16-2011, 08:39 AM
I got a listbox call "listKunden". In my particular case the listbox contains 4 items. If I set a breakpoint in my code and add listKunden to the watch I can verify that listKunden->RecordSet->Item 2->value contains the value I am looking for. Therefore I wrote the following code:
If Form_Kundensuche.listKunden.ItemsSelected.Count = 1 Then
listKunden.ItemData(listKunden.ItemsSelected(0))
So the listKunden list box has exactly one selected item. But "listKunden.ItemData(listKunden.ItemsSelected(0))" always returns null.
While "listKunden.ItemsSelected(0)" returns the correct row index of my list box.
Why does this happen?
If Form_Kundensuche.listKunden.ItemsSelected.Count = 1 Then
listKunden.ItemData(listKunden.ItemsSelected(0))
So the listKunden list box has exactly one selected item. But "listKunden.ItemData(listKunden.ItemsSelected(0))" always returns null.
While "listKunden.ItemsSelected(0)" returns the correct row index of my list box.
Why does this happen?