Results 1 to 4 of 4
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    OutputTo PDF creating extra pages

    I can't figure out why Access form "OutputTo" is creating extra pages. As it is, the code below creates the correct page number 1, but then adds 24 additional pages that don't make sense. I've attached the pdf file so you can see what I mean. Below the code are screenshots of the page setup properties.


    Code:
    Private Sub cmdPDF_Click()
    Dim shellstring As String
    Dim ShellRC As Variant
    
    
    On Error GoTo Err_Handler
    
    
    DoCmd.OutputTo acOutputForm, "frmPrkgNorth", acFormatPDF, "c:\Revel\RDS\ParkingNorth.pdf"
    
    
    If bolCtrlPDF Then
        shellstring = "c:\Windows\Explorer.exe " & "c:\Revel\RDS\ParkingNorth.pdf"
        ShellRC = Shell(shellstring, 4)
        bolCtrlPDF = False
    End If
    
    
    Exit_Handler:
       Exit Sub
    Err_Handler:
       MsgBox "Error " & Err.Number & " amidst PDF creation : " & Err.description
       Resume Exit_Handler
    End Sub

    Click image for larger version. 

Name:	000.jpg 
Views:	8 
Size:	68.1 KB 
ID:	46982
    Attached Thumbnails Attached Thumbnails 001.jpg  
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Are there 25 records in the form's source? Typically you can't print a form because all records will be printed, not just the displayed record. I suspect the same applies to outputting to PDF.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Look what I found...............
    Click image for larger version. 

Name:	004.jpg 
Views:	8 
Size:	19.4 KB 
ID:	46984 Click image for larger version. 

Name:	005.jpg 
Views:	8 
Size:	17.5 KB 
ID:	46985
    Guess how many records are returned by the "misplaced" query

    Are you in town? It's time for lunch so I can absorb some of your technical wisdom.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I'm going to take a wild guess and say...25.

    We're in the DC area right now, then on to the Mayo clinic for my cough. Won't be home for a couple of weeks. Look forward to lunch after that though!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report Repeating Extra Duplicate Pages
    By KMulvey in forum Reports
    Replies: 7
    Last Post: 11-25-2019, 07:08 AM
  2. Query relationships creating extra data
    By Numpty in forum Queries
    Replies: 13
    Last Post: 02-22-2019, 05:01 AM
  3. Report printing extra pages of the same report.
    By khughes46 in forum Reports
    Replies: 5
    Last Post: 06-19-2014, 07:39 AM
  4. Creating a Report with Pages Attached
    By qbc in forum Reports
    Replies: 5
    Last Post: 01-12-2012, 01:28 PM
  5. Creating Web Pages
    By prstoessel in forum Access
    Replies: 7
    Last Post: 08-06-2011, 11:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums