code suddenly not working

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

  • Posted 4 August 2017, 2:48 pm EST

    <P>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</P>
    <P> </P>
    <P>Private Sub ActiveReport_NoData()<BR>Dim sect As Section<BR>For Each sect In Me.Sections'</P>
    <P> sect.Application.Height = 0<BR> sect.Application.Visible = False<BR>Next</P>
    <P>End Sub</P>
    <P>can anybody give me any clues as to where to start looking to rectify this problem ?</P>
    <P>thanks </P>
  • Replied 4 August 2017, 2:48 pm EST

    <P>I am not familar with the 'Application' property, try the code without it would be my suggestion.</P>
    <P><FONT face="Courier New">Private Sub ActiveReport_NoData()<BR>    Dim sect As Section<BR>    For Each sect In Me.Sections'<BR>       sect.Height = 0<BR>       sect.Visible = False<BR>    Next<BR>End Sub</FONT></P>
Need extra support?

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

Learn More

Forum Channels