I have a combo box that locks/corrupts all of the controls on a Access 2003 form. The locking symptom only seems to occur when the list index is greater than 0.
The problem control may not be the combo box. It may be one of two list boxes that are affected by the combo box's 'after update' event.
In the combo box's 'after update' procedure, the data for the two list boxes is updated according to the combo box selection. To update the combo boxes, I have code that first clears all the current items out of each list box.
The code to clear each list box is as such:
intListCount = Me.lstScheduled.ListCount intListIndex = intListCount - 1 Do Until intListIndex = -1 Me.lstScheduled.RemoveItem (intListIndex) intListIndex = intListIndex - 1 Loop
intListCount = Me.lstAvailableTests.ListCount intListIndex = intListCount - 1 Do Until intListIndex = -1 Me.lstAvailableTests.RemoveItem (intListIndex) intListIndex = intListIndex - 1 Loop
Clearing the first list box seems to cause the corruption. If I comment out that portion of the code, the problem seems to go away.
I don't understand why this is happening, because both sets of code are identical, but only the first seems to cause the issue. I have renamed the problem list box (lstScheduled). I have deleted it and re-created it. I have also renamed and re-created the combo box.
Please help me understand what is going on here.
Access 2003, Windows XP
October 8, 2010 4:08 PM
October 8, 2010 5:13 PM