"Property Not Found" Error on BeforeUpdate Cancel

  • Thread starter Thread starter saztronic
  • Start date Start date
S

saztronic

I'm trying to use the BeforeUpdate Event in Access 2007 to potentially
cancel a combobox selection. The combobox is bound, and located on a
subform displaying in datasheet view. The code can be as simple as
this:

_________

Combobox_BeforeUpdate (Cancel As Integer)

If MsgBox("Sure?",vbYesNo) = vbNo Then
Cancel = True
End If

End Sub

_________

Presumably, if the update is canceled the combobox should revert to
its previous value. Instead, the code steps through nicely but once
End Sub is reached a box pops up with the error message "Property Not
Found", and the update is not actually cancelled.

I've googled this and seen others with the same problem who had it
working previously in Access 2003, but then started getting this weird
error once they updated to 2007. I've not seen any answer that
explains the phenomenon or what to do about it.

Any suggestions?

Saztronic
 
Try something more simple. With a combobox named cboCombo, then use the
following code:

Me.cboCombo.Undo
 
Back
Top