So, I inherited MS Access 2010 (and 2013 now) code that has a listbox bound to a column that is not unique. However, that bound value is used in code, so, I cannot change which column is bound. But, I have a subform that needs to requery the listbox on the parent form. What I am struggling with is how to restore the selection in the parent's listbox to what item was selected before the listbox was requeried.
I have tried storing the Parent.List0 value before the requery and then using Parent.List0.Selected and Parent.List0.ItemData, but these do not seem to work because, presumably, the listbox is bound to a column that is not unique.
There is a column in the listbox that is unique. The 4th column (column(3)) is unique, but I'm not finding a way to select a listbox item based on a column other than the bound column.
I am confident someone has some ideas that will sort this out, but I've not been able to locate any solutions in my search of the web.