Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3229084
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:46:10+00:00 2026-05-17T16:46:10+00:00

I have a report in Access that we want split and exported to .rtf

  • 0

I have a report in Access that we want split and exported to .rtf based on a group ID filter. The split works, but in each .rtf file I get an extra page at the end with the page header section but no detail or group footers.

My report has the report header section hidden, page header taking up 1/2 the page, groupID header hidden, detail for each line, another group footer, group ID footer, and the page and report footers hidden.

My margins are top, left, right 0.5 inches, bottom 0.25 inches.

If I print preview from design mode or export to .rtf, there are no extra pages. Doing the same thing in VBA code is giving me different results.

Here is some of the VBA code:

' Now loop through list of labeler values and create a query for each labeler
' so that the data can be exported
Do While Not rsRptGroup.EOF
    sRptGroup = rsRptGroup("reportGroupID")
    'sSQL = "SELECT * FROM qry_export_cms WHERE reportGroupID = '" & sRptGroup & "'"
    ' exclude reportGroupID column
    sSQL = "SELECT state, labeler, product, packageSize, period, name, Units, prescriptions, totalReimburse, medicaidReimb, nonmedicaidReimb "
    sSQL = sSQL & "FROM qry_export_cms WHERE reportGroupID = '" & sRptGroup & "'"
    qdf.sql = sSQL

    sSQL = "SELECT * FROM qry_export_cms_detail WHERE reportGroupID = '" & sRptGroup & "'"
    qdfDetail.sql = sSQL

    On Error Resume Next        ' if doesn't already exist
    Kill sPath & "\rtf\" & sPrefix & sRptGroup & ".rtf"      ' if already created
    On Error GoTo 0         ' resume error trapping

    DoCmd.OpenReport "rpt_summary", acViewPreview, , "reportGroupID='" & sRptGroup & "'", acHidden
    DoCmd.OutputTo acOutputReport, "rpt_summary", acFormatRTF, sPath & "\rtf\" & sPrefix & sRptGroup & ".rtf", False, , , acExportQualityPrint
    DoCmd.Close acReport, "rpt_summary"

    rsRptGroup.MoveNext
Loop

Any ideas??

I tried exporting to .txt and .pdf and get the same thing, the page header repeated without detail or footer sections printed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:46:10+00:00Added an answer on May 17, 2026 at 4:46 pm

    I removed the report header and footer sections and that fixed it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Access Database that outputs a report in Excel format. The report
I have an access 2007 Database that outputs a report in excel format, the
I have a report in SSRS 2005 that's based on a query that's similar
I have a web service that I want to access when it is added
I have built a MS Access 2007 application that can create reports files in
I have a report in MS Access where the underlying data in the tables
I have created a report in MS Access report and write some VBA code
I have a report that uses a TChart that I am maintaining. One of
I have a report in SQL Server Reporting Services (SSRS) that I'd like to
I have a report that renders data returned from a stored procedure. Using profiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.