Undo Combo Box Selection

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

MS Access 2000

My form is bound to a table. I have a combo box on the
form that is bound to a column in the table. After the
user selects an item from the combo box, a column in the
table is populated with the ID of the item the user
selected.

I want the user to be able to undo their selection from
the combo box. That is, I want to delete the ID from the
column in the table.

Thanks.
 
It depends on WHEN you want to undo. If the record hasn't been saved yet, then just
pressing the Esc key while you are still at the combo box will undo it. The code

Me.cboMyCombo.Undo

will also undo the combo box. Pressing the Esc key a 2nd time will undo all changes to the
record or use the code

Me.Undo

If the record has been saved, then you'll have to edit the record. There is no "undo" at
this point.
 
Yes, I meant after the record has been saved.

I can highlight the record in the combo box, press the
Delete key, and then press the Enter key. This seems to
work OK.

Thanks.
 
Back
Top