Go Back   Access World Forums > Microsoft Access Discussion > Reports

Thread Tools Rate Thread Display Modes
Old 10-06-2019, 07:50 PM   #1
Newly Registered User
Join Date: Jul 2019
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Lkwdmntr is on a distinguished road
Printing with page-breaks

I am having another issue dealing with printing my reports.

I have a counter in my footer and if it gets to 40, I have several things that happen.

1. I make my one header for a subreport disappear.
2. A header in another subreport appears.
3. One of my page breaks becomes visible.
4. Another page break becomes invisible.

In print preview, it is doing everything correctly, but when I go to print, the page break that was invisible in preview becomes visible when printing. This gives me 3 pages when I only want 2.

Anyone have any ideas about what might be happening. Here my VBA code, perhaps something is wrong with it, although I don't understand why it shows in the preview correctly.
Private Sub Report_Load()

If Me.TotRec > 39 Then
Me.MaLhdr.Visible = False
Me.BreakMLA.Visible = True
Me.BreakNSA.Visible = False
Form_SubReport_MonMALChallenges.subMALhder.Visible = True
Me.MaLhdr.Visible = True
Form_SubReport_MonMALChallenges.subMALhder.Visible = False
Me.BreakMLA.Visible = False
Me.BreakNSA.Visible = True
End If

End Sub

Lkwdmntr is offline   Reply With Quote
Old 10-06-2019, 08:02 PM   #2
Newly Registered User
Join Date: Jul 2019
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Lkwdmntr is on a distinguished road
Re: Printing with page-breaks

Well, I think I know what is happening. I was using a macro and it without loading the form first. I still would like to see the preview before I print. I have used this code.

DoCmd.OpenReport "Tue_Reporting_Form", acViewPreview
DoCmd.RunCommand acCmdPrint

I also got a macro to do the same thing, but I can't preview the report until I hit print.
Lkwdmntr is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Report lacks page breaks Patfreem Reports 1 05-03-2012 12:52 PM
Page Breaks Treason Reports 1 05-31-2002 01:42 PM
Subreport page headers and page breaks? PaulA Reports 2 11-02-2001 03:15 PM
Page breaks for 2 or 3 records per page Mwildrick Reports 3 06-11-2001 04:53 PM
[SOLVED] Page Breaks Marcus Reports 1 07-04-2000 05:00 PM

All times are GMT -8. The time now is 06:22 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World