code suddenly not working

Posted by: pete-newman on 4 August 2017, 2:48 pm EST

  • Posted 4 August 2017, 2:48 pm EST

    i was given this code a little while ago by someone from this site, to not print a sub report if it had no data.  however for some reason when transfering the dev system to a new machine  the code no longer works


     


    Private Sub ActiveReport_NoData()
    Dim sect As Section
    For Each sect In Me.Sections'


     sect.Application.Height = 0
     sect.Application.Visible = False
    Next


    End Sub


    can anybody give me any clues as to where to start looking to rectify this problem ?


    thanks

  • Replied 4 August 2017, 2:48 pm EST

    I am not familar with the 'Application' property, try the code without it would be my suggestion.


    Private Sub ActiveReport_NoData()
        Dim sect As Section
        For Each sect In Me.Sections'
           sect.Height = 0
           sect.Visible = False
        Next
    End Sub

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels