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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report formatting question

Status
Not open for further replies.

Ray1127

Programmer
Feb 22, 2002
231
US
I have a report in Access 2000 that has 2 group headers and footers. After the first group footer the report is set to goto a new page after the section. The problem is that there is a report footer that shows the Grand total of the report and it ends up on a page all by itself. How do I suppress the new page for the Report footer??
 
After the first group footer the report is set to goto a new page after the section

Try something like IF [Page] = [Pages] Then yourfootername.ForceNewPage = 0. Try in the group footer format event (I think it would be too late in the sequence of events to put in the report footer format).

Ever notice how fast Windows runs? Me neither.
 
Unfortunately the [Pages] doesn't get anything except 0 until the Report Footer Format event occurs. So [Page] = [Pages] in the Group Footer is never true as [pages] = 0 until the report footer is being processed.
 
Good point. Yopu can capture the [Pages] in a module-level variable in the report header where you'll have to set a textbox controlsource =[pages] or it doesn't get calculated, then set the variable = textbox in code, then interrogate your variable in the footer. You can always set the text box.visible = false, or its forecolor = white if you don't want it to print back.

Ever notice how fast Windows runs? Me neither.
 
I have two reports which are very similar, so it will make sense to make it one report, and just insert a different header.
I have declared a variable "Header" when calling the Report:
Private Sub Befehl22_Click()
Dim stDocName As String
Dim Header As String
Header = "Header for Transatlantic"
stDocName = "Openorders"
DoCmd.OpenReport stDocName, acPreview, , "[Ausblenden]=False AND [Shipped] ='Nein' AND [Bestellnummer-D]Not Like 0 AND [Anfragende Firma] Like'Transatlantic*'"

Exit_Befehl122_Click:
Exit Sub

End Sub

In my report I have created a text Field TEXT1000.
And in the header section I have an Onformat VBA like that:

Private Sub Berichtskopf_Format(Cancel As Integer, FormatCount As Integer)
'Me.[Text1000] = "Header"
End Sub

It would be nice if somebody could assist me to make this work.

Rainer




 
Rainer - you'll get replies if you start a new thread.

Ever notice how fast Windows runs? Me neither.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top