Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Try decompiling the database. See [topic="44571"]this topic[/topic] for info on decompiling.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •