🎉Find Prospects and SendCold Emails All in One Place

HOW TOaHow to Add Conditional Page Breaks in MS Access

Table of Contents

You’ve built a clean MS Access report. The data is accurate, the layout looks sharp — and then you preview it for print. Pages break in the wrong places. Group headers orphan at the bottom of a page. Records that belong together get split across two sheets. It’s frustrating, and it makes your reports look unprofessional.

Conditional page breaks solve exactly this problem. Instead of forcing a break at every section, you control when the break fires — based on your data, your logic, or specific field values. With over 95,000 companies actively using Microsoft Access, and the platform still holding a 7.25% market share in database management systems globally, knowing how to get your reports formatted correctly isn’t optional — it’s essential.

This guide walks you through every method for adding conditional page breaks in MS Access: from the simple Design View approach, to VBA event procedures, to the Force New Page property for grouped reports.

What Is a Conditional Page Break in MS Access?

A conditional page break is a page break that only fires when a specific condition is met — not unconditionally after every record or section.

In MS Access, you insert a Page Break control into your report and then control its Visible property through VBA code or a macro. When Visible = True, the break fires. When Visible = False, it doesn’t.

This is different from a static page break, which always triggers at the same position regardless of what the data looks like.

Why it matters: Access databases often serve printing-heavy workflows — invoices, address directories, fact sheets, compliance documents. A poorly placed page break wastes paper, confuses readers, and makes reports feel unfinished.

Method 1: Insert a Static Page Break in Design View

Before you go conditional, it helps to understand the base mechanic — inserting a page break control manually.

Step-by-step:

  1. Open your report in Design View
  2. Go to the Design tab → Controls group
  3. Click Insert Page Break
  4. Click the location in your report where you want the break placed

Access marks the page break with a short dotted line on the left edge of the report. This is your visual indicator that the control is placed correctly.

Important: Always place the page break control either above or below an existing control — never on top of one. Placing it on a control will split that control’s data across two pages.

Page breaks are visible in Print Preview only. You won’t see the effect in Report View or Layout View.

Where you can place page breaks:

  • Report Header (forces a title page to stand alone)
  • Detail section (fires between individual records)
  • Group Header or Footer (forces groups onto new pages)

You cannot place page breaks in the Page Header or Page Footer sections.

Method 2: Add a Conditional Page Break Using VBA

This is the core technique for conditional logic. The idea is simple: insert a Page Break control, give it a name, then write VBA in the section’s Format event to show or hide it based on your condition.

Setting Up the Page Break Control

  1. Open your report in Design View
  2. Insert a Page Break control in the Detail section (or whichever section you want to control)
  3. Open the Property Sheet (press F4)
  4. Give the control a clear name — for example, CondPgBreak

Writing the VBA Code

Open the Format event of the section where you placed the control. In the VBA editor, write logic that sets Visible to True or False based on your condition.

Example: Break the page every 10 records

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    If Me![Counter] Mod 10 = 0 Then

        Me![CondPgBreak].Visible = True

    Else

        Me![CondPgBreak].Visible = False

    End If

End Sub

Example: Break the page on even page numbers (for duplex printing)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    If Me.Page Mod 2 = 0 Then

        Me![CondPgBreak].Visible = True

    Else

        Me![CondPgBreak].Visible = False

    End If

End Sub

Example: Reset the break in the Page Header

It’s best practice to hide the page break at the start of every page so it doesn’t fire unless the condition is explicitly met:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

    Me![CondPgBreak].Visible = False

End Sub

This two-part pattern — reset in the page header, trigger in the detail section — gives you precise, reliable control.

Common mistake: Using Detail_Print instead of Detail_Format can cause incorrect pagination totals (e.g., Access showing “Page 6 of 16” when there are only 12 pages). Always use Detail_Format for conditional page breaks.

Method 3: Force New Page for Grouped Reports

If your report uses grouping, you don’t always need VBA. The Force New Page property lets you automatically start each group on a new page — no code required.

Step-by-step:

  1. Open the grouped report in Design View
  2. Click anywhere in the Group Header section
  3. Press F4 to open the Property Sheet
  4. In the Force New Page property, select an option:

Option

What It Does

None

No automatic page break (default)

Before Section

Breaks before the section prints

After Section

Breaks after the section prints

Before & After

Breaks both before and after

Example use case: You have a report grouped by product category. You want each category to start on its own page. Set the Category Header’s Force New Page property to Before Section. Done.

This is the cleanest approach for grouped data — no VBA needed, and it scales automatically as your data changes.

Method 4: Use the Keep Together Property

Before writing any VBA, check if the Keep Together property solves your problem first. It’s the easiest option and handles the most common scenario: keeping a group header from stranding alone at the bottom of a page.

How it works:

  • Set Keep Together = Yes on a group section
  • Access will move the entire section to the next page if it can’t fit completely on the current one
  • No code, no page break control needed

When it’s the right choice:

  • You want a group header and its first detail record on the same page
  • You want to avoid orphaned headers at the bottom of pages
  • Your group sizes are predictable

When it’s not enough:

  • You need logic based on field values (e.g., “break after Category A ends”)
  • You’re doing duplex printing and need odd/even page control
  • You need multiple branches on one page if they’re short enough

For those cases, VBA is the right path.

Method 5: Use a Macro to Control the Visible Property

If you prefer not to write VBA, Access macros can also toggle a page break control’s Visible property. This approach works well for simpler conditional logic.

Step-by-step:

  1. Open your report in Design View and insert a Page Break control — name it (e.g., CondPgBreak)
  2. In the Database Window, go to Macros → New
  3. In a blank action row, select SetValue
  4. Set the Item argument to: [CondPgBreak].[Visible]
  5. Set the Expression argument to: No (this hides the break by default)
  6. Save this macro — call it something like HidePageBreak
  7. In report Design View, set the OnFormat property of the Page Header section to HidePageBreak

Now create a second macro that sets Visible to Yes when your condition is met. Attach this macro to the relevant section’s OnFormat event.

When the condition triggers, the page breaks. When the page header resets the break to hidden, it waits for the next trigger.

Method 6: Use the acbConditionalBreak Function for Space-Based Breaks

This advanced technique is useful when you want to prevent bad breaks — specifically, when you want to avoid a group header printing alone at the bottom of a page with no detail records following it.

The acbConditionalBreak function checks how much vertical space remains on the current page before a section prints. If there isn’t enough room for the header plus at least one detail line, it fires a page break early.

Implementation overview:

  1. Insert a Page Break control at the top of your group header section (above all other controls)
  2. In the group header’s OnFormat property, enter:

=acbConditionalBreak([Report], 12600, [PageBreak1])

The number 12600 represents space in twips (a unit of measurement). To calculate it:

  • Measure the vertical space needed for the group header + minimum detail lines + page footer
  • If measuring in inches: multiply by 1,440 to convert to twips
  • If measuring in centimetres: multiply by 567
  • Subtract the result from the total page height in twips (for a standard letter-size portrait page: 15,840 twips)

Set Force New Page = None and Keep Together = Yes on the group section. The function handles the break logic.

This technique is particularly effective for business address reports, customer directories, and any report with variable-length groups.

Troubleshooting Common Issues

Even with the right approach, conditional page breaks in Access can behave unexpectedly. Here are the most common problems and fixes.

The page break fires on every page, not just when conditions are met

You’re likely missing the reset step. Add code (or a macro) in the Page Header’s Format event to set Visible = False at the start of every page. Without this, the break stays visible from the last time it was triggered.

Incorrect page count totals (e.g., “Page 6 of 16” when there are 12 pages)

Switch your VBA from Detail_Print to Detail_Format. The Print event calculates differently and can throw off Access’s total page count. Format is the correct event for conditional visibility logic.

The page break fires at the wrong position

Verify the physical placement of the Page Break control in Design View. The control must be placed precisely where the break should occur. Even a small positional difference can shift the break to the wrong location.

“Method or Data Member Not Found” error in VBA

The control name in your code doesn’t match the actual name of the Page Break control in the report. In Design View, click the control and check the Name property in the Property Sheet. Replace PageBreakX in your code with the exact name shown.

The Keep Together property isn’t working

Keep Together only prevents a section from being split — it won’t keep a header together with detail records unless you set it at the group level. Also, if detail sections are very tall, Access may ignore Keep Together if the section can’t fit on any page.

Choosing the Right Method

Your Goal

Best Method

Each group on its own page

Force New Page property

Prevent orphaned headers

Keep Together = Yes

Break every N records

VBA in Detail_Format

Break based on a field value

VBA in Detail_Format

Duplex / odd-even printing

VBA with Me.Page Mod 2

No code preferred

Macro + SetValue

Prevent bad breaks near page end

acbConditionalBreak function

Start with the simplest option that solves your problem. Force New Page and Keep Together cover the majority of real-world cases without any code. When you need field-level logic or printing-specific control, drop into VBA.

Conclusion

Conditional page breaks in MS Access give you precise control over how your reports print — keeping groups together, avoiding orphaned headers, managing duplex layouts, and preventing wasted pages. The right method depends on what you’re trying to achieve: start with Force New Page or Keep Together for grouped reports, move to VBA when your logic depends on field values or page numbers, and use macros when you want to avoid code entirely.

With over 95,000 businesses relying on MS Access and it ranking among the top 10 database systems globally, building reports that print cleanly is a skill that pays off every time a stakeholder opens one. Apply the methods in this guide and your reports will look exactly the way they should — every time.

🚀 Struggling to Fill Your Pipeline?

We build cold outbound systems that generate qualified meetings — targeting, campaigns, and scaling, done for you.

7-day Free Trial |No Credit Card Needed.

FAQs

How does mastering MS Access reports connect to generating leads for my business?

Polished, professional reports are just one piece of a scalable business operation. If you're building systems inside your business to perform better — whether that's clean data output or smarter workflows — the same logic applies to your outbound pipeline. SalesSo builds complete outbound lead generation systems across cold email, cold LinkedIn, and cold calling. From precise targeting and campaign design to scaling what works, we handle the full engine so your team focuses on closing. Book a strategy meeting to see how a purpose-built outbound system generates qualified meetings consistently.

What is the difference between Force New Page and a Page Break control?

Force New Page is a section property that always fires; a Page Break control can be shown or hidden conditionally via VBA.

Can I use a macro instead of VBA for conditional page breaks?

Yes. Use the SetValue macro action to set the Visible property of the Page Break control to Yes or No based on your condition.

Does Keep Together work the same as a conditional page break?

No. Keep Together prevents a section from splitting; it doesn't fire a break based on data logic or field values.

We deliver 100–400+ qualified appointments in a year through tailored omnichannel strategies

What to Build a High-Converting B2B Sales Funnel from Scratch

Lead Generation Agency

Build a Full Lead Generation Engine in Just 30 Days Guaranteed