[AccessD] Need to Suppress Main Report Line if the relatedSub-Report has no Data

Rocky Smolin rockysmolin at bchacc.com
Thu Dec 5 22:26:39 CST 2013


I would use the format event of the detail section to get the record count
of the sub report and, if it's zero then 

Me.MoveLayout = False
Me.NextRecord = True
Me.PrintSection = False

HTH

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Thursday, December 05, 2013 5:17 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Need to Suppress Main Report Line if the
relatedSub-Report has no Data

All,

I have a report that has one sub-report.  This sub-report is tied to a field
in the detail lines of the main report.

Recently, our users requested that if there is no data in the sub-report
they would like to see the related line on the main report suppressed. 

I have never tried to do this before.  I have set up a little test Access
application and tried a few ideas, but have not found a good solution.

Is there a way to accomplish this with Access 2007?

Thanks,
Brad



More information about the AccessD mailing list