Solved

MS Access conditionally print a group footer

Posted on 2011-02-16
3
497 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 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