I have a listbox on my form that displays a series of data from a query. After I set the rowsource in VBA, I want to select the first item in the list and display it highlighted to the user. My code is as follows:
lstAnalyticals = lstAnalyticals.ItemData(0)
lstAnalyticals_Click
On the click event, I take all of the fields in the listbox and display them in textboxes on my form, this way I can click different entries and display the information.
When the form loads, the appropriate entries load in the textboxes, but the first entry in the listbox doesn't appear to be selected (none of them do). When I click on listbox, the entries are highlighted.
Is there anyway to make the entry in the listbox highlighted using VBA? Thanks!
lstAnalyticals = lstAnalyticals.ItemData(0)
lstAnalyticals_Click
On the click event, I take all of the fields in the listbox and display them in textboxes on my form, this way I can click different entries and display the information.
When the form loads, the appropriate entries load in the textboxes, but the first entry in the listbox doesn't appear to be selected (none of them do). When I click on listbox, the entries are highlighted.
Is there anyway to make the entry in the listbox highlighted using VBA? Thanks!