Solved

MS Access conditionally print a group footer

Posted on 2011-02-16
3
474 Views
Last Modified: 2012-05-11
In an Access report I need to print a group footer if the date range is more than 1 day. If not I need to suppress the group footer altogether. I have code in the in the On Format property of the group footer where I compare the dates. This appears to work but I do not know the code to suppress the group footer. Your assistance is appreciated. Thanks.
0
Comment
Question by:StampIT
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
RgGray3 earned 250 total points
ID: 34909392
If you have the logic worked out to decide to cancel the printing of the section

use the Cancel property of the section

Private Sub GroupFooter0_Print(Cancel As Integer, PrintCount As Integer)

    If...  your logic
         Cancel = True
    End if


From microsofts help
"The Print event occurs after data in a report section is formatted for printing, but before the section is printed. "

0
 

Author Closing Comment

by:StampIT
ID: 34917120
Thanks for the help
0
 
LVL 11

Expert Comment

by:RgGray3
ID: 34918102
Glad to help...
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now