"Property Not Found" Error on BeforeUpdate Cancel

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
 
M

Maverick

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

Me.cboCombo.Undo
 
Joined
Apr 29, 2013
Messages
1
Reaction score
0
This is a buggie in MS Access 2007, what you need to do is either use Docmd.CancelEvent or use undo in AfterUpdate event. Below is the link to do it.
 

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