Unable to undo bound combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Haven't worked with Access for some time & this forum is so helpful.

I have a for & 2 sub-forms - sfContacts is for data entry and sfContacts3 is
datasheet view. They are linked in OnLoad of fContacts with
Set Me.sfContacts.Form.Recordset = Me.sfContacts3.Form.Recordset

One of the controls on sfContacts is a bound combo box.

If the user has already selected an enty in this combo box & then changes to
one particular entry, I need confirmation that they really wish to apply that
change.

In BeforeUpdate of the combo box I use MsgBox with vbYesNo and if the
response is not vbYes then the process is
Me.cbEnqID.Undo

While the program definitely gets to that line, the change is not undone.

Using Access 2002
 
Graham said:
Haven't worked with Access for some time & this forum is so helpful.

I have a for & 2 sub-forms - sfContacts is for data entry and sfContacts3 is
datasheet view. They are linked in OnLoad of fContacts with
Set Me.sfContacts.Form.Recordset = Me.sfContacts3.Form.Recordset

One of the controls on sfContacts is a bound combo box.

If the user has already selected an enty in this combo box & then changes to
one particular entry, I need confirmation that they really wish to apply that
change.

In BeforeUpdate of the combo box I use MsgBox with vbYesNo and if the
response is not vbYes then the process is
Me.cbEnqID.Undo

While the program definitely gets to that line, the change is not undone.

Using Access 2002


Did you remember to set the BeforeUpdate event procedure's
Cancel argument to True?
 
Thanks Marshall

That did the trick.

All too easy when one knows what to do.

Thanks again
 

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

Back
Top