Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable page header in the last page! 2

Status
Not open for further replies.

xinyin

Programmer
Jan 16, 2003
81
HK
I made a report which has - (1) a self-made page header (created by using sorting & grouping); (2) a detail part having a continuous list of data; and (3) REPORT footer.
The self-made header is set to appear in each page so that the reader can know what the data is about without keep going back to the first page.
(1) Sometimes the list of data finishes at the very bottom of the second-last page, so the report footer goes to the last page - but the self-made header also shows up in the last page - even when there is no more data can be shown below it.
I want to know if there is a syntax for report in VBA such as
Private sub Detail_Format
[if this page's recordcount = 0]
[then self-made header.visible = false]
or even
[then delete the whole last page] (the report footer is not really that necessary if it cannot stay in the same page with the data list. In this case the whole last page must be delete, not simply make report footer and the useless header invisible, because it affects the "Page x of y" stuff in the report.) ?
(2) I feel that it is much harder to do coding for reports than forms, because it looks like there is much less option for reports? Only Format, Print and Retreat? I can't find useful information in the help menu because I am not sure what "search word" I should type in?
 
You should be able to add code like
Cancel = (Me.Pages = Me.Page)


Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top