Hello All, I hope some can help me with this frustrating problem:
I have developed an application, which uses a tab control with four separate tabs. Each of these tabs contains a different list box. When a tab is clicked then the change evern is obviously fired and in there I have the following code:
This sort of works in that when I click on the tab the list box is displayed and the first item is selected. The problem is that when I try to do anything with the selection it says there is no item selected and I have to physically click on the item before it is marked as selected.
In addition I have tried using the ListIndex property to set values, i.e
This again works partly and when it does work it solves the problem above. The problem I have with this is that sometimes when I click between tabs I get an error messge saying that the ListIndex propery has been used incorrectly!!!!
Does anyone have any idea how I can fix either of these problems as I have identified this in the testing of the code and it is holding up release.
Thanks in advance
Andrew
I have developed an application, which uses a tab control with four separate tabs. Each of these tabs contains a different list box. When a tab is clicked then the change evern is obviously fired and in there I have the following code:
Code:
if (me.list_test.ListCount > 0) then
me.list_test.Selected(1) = true
end if
This sort of works in that when I click on the tab the list box is displayed and the first item is selected. The problem is that when I try to do anything with the selection it says there is no item selected and I have to physically click on the item before it is marked as selected.
In addition I have tried using the ListIndex property to set values, i.e
Code:
me.list_test.ListIndex = 0 ' to select the first item
This again works partly and when it does work it solves the problem above. The problem I have with this is that sometimes when I click between tabs I get an error messge saying that the ListIndex propery has been used incorrectly!!!!
Does anyone have any idea how I can fix either of these problems as I have identified this in the testing of the code and it is holding up release.
Thanks in advance
Andrew