• Event Procedure errors

    Author
    Topic
    #458082

    I have a report in Access 2007 that I have been using for over a year. Starting yesterday, when attempting to open the report, I get the following message in a dialog box.

    The expression On Print you entered as the event property setting produced the following error:
    * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
    * There may have been an error evaluating the function, event, or macro.

    The formatting of the report has not changed. Here is a code I have in the “OnPrint” sections.

    [codebox]Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
    Select Case Me.intJobTypeCode.Value
    Case Is = 1
    Me.SectionFooterMF.Visible = True
    Me.SectionFooterAX.Visible = False
    Case Is = 27
    Me.SectionFooterMF.Visible = False
    Me.SectionFooterAX.Visible = True
    End Select
    End Sub
    Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
    Select Case Me.intJobTypeCode.Value
    Case Is = 1
    Me.SectionHeaderMF.Visible = True
    Me.SectionHeaderAX.Visible = False
    Case Is = 27
    Me.SectionHeaderMF.Visible = False
    Me.SectionHeaderAX.Visible = True
    End Select
    End Sub[/codebox]

    What am I doing wrong? Why would this start yesterday?

    Viewing 0 reply threads
    Author
    Replies
    Viewing 0 reply threads
    Reply To: Event Procedure errors

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: