none
Receive an "object or class does not support the set of events" diagnostic

    Question

  • Working with Access 2010 on an XP system on Citrix, I receive the diagnostic in the title when I want to open a Form or when I switch to Design View. The error is prefixed with The expressio On Click you entered as the event property setting produced the following error. Clicking on OK cause the view of the same form.

    Calling VBA code is

    Private Sub btnEdit_Click()

    On Error GoTo Err_btnEdit_Click

        Dim stDocName As String

        Dim stLinkCriteria As String

        stDocName = "frmPerson"

        stLinkCriteria = "[PersonID]=" & Me![PersonID]

        DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_btnEdit_Click:

        Exit Sub

    Err_btnEdit_Click:

        MsgBox Err.Description

        Resume Exit_btnEdit_Click

    End Sub

    I just note that when I open the VBA editor, the error does not occurr and the new form is opened. Even after closing the VBA editor, the error has disappeared.

    Also, the problem does not occurr on my Laptop with Windows 7 and Access 2010

    Please let me know how I canprevent the problem.

     

    Vic
    Tuesday, May 31, 2011 6:13 PM