I need to manipulate an Access 97 listbox in VBA code. The only way I've found to do this is with code like:
MyListBox.Selected(4) = True
which will select the fifth item in the listbox, and de-select whichever item was previously selected. So far so good.
However, when I then refer to the Value of the listbox in an expression, it still has the Value of the previously selected item, even though the fifth item is currently selected. How can I change the Value of the listbox to match the current selection?
MyListBox.Selected(4) = True
which will select the fifth item in the listbox, and de-select whichever item was previously selected. So far so good.
However, when I then refer to the Value of the listbox in an expression, it still has the Value of the previously selected item, even though the fifth item is currently selected. How can I change the Value of the listbox to match the current selection?