-
Listindex
Hi All:
How can I select the Listindex of a combobox or listbox?
I am populating the combobox in the following manner:
For i = 1 To oRecData.RecordCount
With Form2.cmboevebldg
sDesc = oRecData.Fields("Location_Name") & Space(60) & "$" & CStr(oRecData!Location_ID)
.AddItem sDesc
.ItemData(.NewIndex) = oRecData!Location_ID
End With
oRecData.MoveNext
Next i
I need the location_ID
Thanks:afrog:
-
I do not fully understand your code, but ListIndex is a number starting at zero that determines the selection. So this selects the first item in the combobox :-
Code:
Form2.cmboevebldg.ListIndex = 0
-
Resolved:Listindex
Hi BrianB:
Thanks for getting back to me. I got the answer I was looking for.
Thanks again