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 400767
In Process

The Archive Base Latest Questions

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

I am creating a report in Access 2007 and am able to save it

  • 0

I am creating a report in Access 2007 and am able to save it as a PDF, but the problem is that instead of having 1 report per PDF I have got 206 Reports in 1 PDF. I’m using VBA to programatically do this
here is the code I’m using

Sub makeLetterPDF(Contract As String, LetterType, outTo As String)

Dim rs As New ADODB.Recordset
Dim strReportName As String
Dim strFileName As String
Dim Maxrow As Integer
Dim C As Integer

Dim fileno As Integer

    SysCmd acSysCmdSetStatus, "Saving " & C & " of " & Maxrow

    strReportName = LetterType

    strFileName = LetterType & fileno & ".PDF"

    fileno = fileno + 1

    DoCmd.OutputTo acOutputReport, strReportName, acFormatPDF, _
                    outTo & "\" & strFileName, , , , acExportQualityPrint ``"
    SysCmd acSysCmdSetStatus, " "

End Sub

Private Sub Report_Open(Cancel As Integer)

Dim strRecordSource As String

    strRecordSource = "Exec dbo.rsp_Letter_ServiceBooking '" & Contract & "'"
    Me.RecordSource = strRecordSource

End Sub

The report open has the Stored Procedure that has the data I need for the report but how do I iterate through this to create the individual reports as the makeLetterPDF is run first

  • 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-12T16:58:18+00:00Added an answer on May 12, 2026 at 4:58 pm

    i sorted it buy changing the way i got the data and only getting one record at a time this works

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

Sidebar

Related Questions

I have an advanced query/report that I need help creating in Access 2007. The
I am creating a report such that when you click on a data point
I'm creating a report that will take some data from one database (Company and
I'm creating a report that lists patient deaths by date and by doctor. There
Okay, so here's my problem: We use FOP for creating pretty report output. We
So I am creating an excel report from an access database. So this is
In Microsoft access 03.I am creating a database and want the user to have
I have a new Winforms application that is replacing an existing Access order processing
I'm currently in the process of creating an extensive Access report (~50 calculated fields)
in my grails application using jasper Reports i am creating report in pdf format,

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.