Undo Combo Box Selection

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.
 
W

Wayne Morgan

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.
 
W

Wayne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top