Save changes to a listbox?

J

Joe Holzhauer

I have a listbox based on a SQL statement that is changed every time a
combobox is updated. In the cboBox_AfterUpdate method, I update the SQL and
requery, then I select the first row in the listbox. While the listbox has
the focus, if a user hits a certain key, a certain thing happens (in this
case, you hit 'Y' and a value in one column of the selected row changes to
'Yes'--'N' for 'No', etc.)

It works well--until the user updates the combobox. The update occurs, the
listbox is requeried, the first row is selected... but when I hit 'Y', the
row that was PREVIOUSLY selected (before I changed the combobox and the
first row was programmatically selected) changes to 'Yes'!

Does anyone know what step I skipped? What do I have to do?

Thanks so much,
Joe
 
Top