"Property Not Found" Error on BeforeUpdate Cancel

Discussion in 'Access Forms Coding' started by saztronic@gmail.com, Aug 28, 2008.

  1. Guest

    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
     
    , Aug 28, 2008
    #1
    1. Advertisements

  2. Maverick Guest

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

    Me.cboCombo.Undo


    "" wrote:

    > 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
    >
    >
     
    Maverick, Aug 28, 2008
    #2
    1. Advertisements

  3. phenix

    Joined:
    Apr 29, 2013
    Messages:
    1
    Likes Received:
    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.
     
    phenix, Apr 29, 2013
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Stephan
    Replies:
    3
    Views:
    227
  2. Mike Boozer

    Cancel Cllick Event Won't Cancel

    Mike Boozer, Apr 26, 2004, in forum: Access Forms Coding
    Replies:
    4
    Views:
    368
    Mike Boozer
    Apr 28, 2004
  3. Tahlmorrah

    Runtime error: '424' during Vaildation using BeforeUpdate

    Tahlmorrah, Oct 29, 2004, in forum: Access Forms Coding
    Replies:
    3
    Views:
    140
    Wayne Morgan
    Nov 4, 2004
  4. Stef

    ComboBox BeforeUpdate Cancel not working

    Stef, Oct 21, 2005, in forum: Access Forms Coding
    Replies:
    4
    Views:
    339
  5. PC Datasheet

    Cancel BeforeUpdate and Return To Old Value

    PC Datasheet, Oct 24, 2005, in forum: Access Forms Coding
    Replies:
    2
    Views:
    196
    PC Datasheet
    Oct 24, 2005
  6. lucy
    Replies:
    0
    Views:
    193
  7. swas

    Property not found error

    swas, Jun 4, 2007, in forum: Access Forms Coding
    Replies:
    3
    Views:
    129
  8. Angelsnecropolis

    Cancel BeforeUpdate Subf on Form Close

    Angelsnecropolis, Dec 2, 2008, in forum: Access Forms Coding
    Replies:
    0
    Views:
    154
    Angelsnecropolis
    Dec 2, 2008
Loading...