Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cancel Header / Footer

Posted on 2004-11-14
4
Medium Priority
?
246 Views
Last Modified: 2008-03-06
Experts,

The following code is only works for one page and I do not know how to modify the code to make the header or footer disappear for more than one page.  I have tried commas, ands, another line to no avail.

Cancel = [Page] = ? (the ? is the page number)

The code is put in the on format event in the header or footer section.
How can I make this code work for more than one page?

thank you
0
Comment
Question by:Petrobras
  • 2
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 12580653
Use Report Header instead of Page Header.  Would that do?
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 12580661
Or, other way around, to make it work on all pages transfer it to page header from report header.  
0
 
LVL 16

Expert Comment

by:GreymanMSC
ID: 12580886
Canceling a small number of predetermined page numbers:
  Cancel = (Page = 1) Or (Page = 3)

Canceling all even pages.
  Cancel = (Page Mod 2 = 0)

Canceling a large number of predetermined page numbers
  Select Case Page
  Case 1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43
    Cancel = True
  Case Else
    Cancel = False
  End Select
0
 
LVL 16

Accepted Solution

by:
GreymanMSC earned 2000 total points
ID: 12580893
The real question is, which pages do you wish to cancel - and why?
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

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 shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

810 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