The expression After Update you entered as the event property setting produced the following error: Object or class does not support the set of events RRS feed

  • Question

  • I'm getting the error above on Access version 2007.  Version 2003 works fine - the after update event has code to find a particular record.

    Private Sub cmbFindClient_AfterUpdate()
        ' Find the record that matches the control.
        Dim rs As Object

        Set rs = Me.Recordset.Clone
        rs.FindFirst "[CL-PK Client ID] = " & Str(Nz(Me![cmbFindClient], 0))
        If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
    End Sub

    For the benefit of others, please mark posts as answered or helpful when they answer or assist you in finding the answer. ___ "We came all this way to explore the Moon, and the most important thing is that we discovered the Earth." - Bill Anders, Apollo 8.

    Saturday, January 6, 2018 4:47 AM

All replies

  • ciao SuzyQ,

    I think you should apply recordsetClone property and not clone method.

    try this way :

    Private Sub cmbFindClient_AfterUpdate()

    If Len(Me!cboImp & vbNullString) > 0 Then

       With Me.RecordsetClone

            .FindFirst "[CL-PK Client ID]=" & Me!cmbFindClient

            If Not .NoMatch Then

                Me.Bookmark = .Bookmark

            End If

        End With

    end if

    End Sub 

    I assumed CL-PK Client ID field is numeric and not text.


    Ciao, Sandro.

    • Edited by Sandro Peruz Saturday, January 6, 2018 8:32 AM added if statement
    • Proposed as answer by Terry Xu - MSFT Monday, January 8, 2018 6:21 AM
    Saturday, January 6, 2018 8:20 AM