I have an Access application that has been working fine. On one form I have a multi-select (simple) listbox. This listbox has two columns: the first is the primary item, and the 2nd is a number so I can show the user the order in which he selected items. To accomplish this, I use the AfterUpdate event to put the selected item into a Collection (or remove it from the collection); and then run a function to update the listbox adding numbers to the 2nd column. To do this I have to remove the item and then add it back into the listbox. So, I also have to update the Selected property for each row in the listbox. If the user selects an item that required him to scroll down (below the visible items), the processing I do moves the listbox back to the top. All this works fine.
So I decided added a few lines of code to force the listbox to scroll the selected item to the middle of the listbox by setting the ListIndex. After doing this, Access crashes as soon as the user presses any button on the form. It is before the button's associated event code is executed (I can't trap it). The crashes appear in the Windows Error Logs: Access abends with a x00..000C05 abend. I tried decompiling, cleaning up and recompiling - no changes. I comment out the ListIndex code and it works fine. Any ideas????