Results 1 to 2 of 2
  1. #1
    mrmims is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2013
    Posts
    53

    Fill Report with Enough Records for 1 page?

    Hello,

    I have a query which will return 100s of dates for upcoming tests when run. I don't need to see ALL records when I print the report, only enough fill the page.

    How do I tell the report to only run enough to fill the page? With the formatting I like, I know it is 25 records. I can set the Top Values to 25 and that works all dandy, but I was wondering if there is another to do this? Especially if later on I want to change formatting. The Top Values method seems sloppy.

    Thank you

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    dont filter the data, but let this code print only 1 page....

    Code:
    Private Sub cmdPrintInvoice_Click()
    On Error GoTo Err_cmdPrintInvoice_Click
     
    Dim stDocName As String
     
    stDocName = "Invoice"
    DoCmd.OpenReport stDocName, acHidden  '<=== acHidden is KEY
    DoCmd.PrintOut acPages, 1, 1, acHigh, 1, yes
    DoCmd.Close acReport, stDocName, acSaveNo
     
    Exit_cmdPrintInvoice_Click:
    Exit Sub
     
    Err_cmdPrintInvoice_Click:
    MsgBox Err.Description
    Resume Exit_cmdPrintInvoice_Click
     End Sub

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

Similar Threads

  1. Report print two records per page
    By dwilson in forum Reports
    Replies: 3
    Last Post: 07-21-2012, 10:48 AM
  2. Limit records on a page of a report
    By bgarey in forum Reports
    Replies: 4
    Last Post: 02-16-2012, 01:42 PM
  3. Replies: 1
    Last Post: 01-17-2012, 02:54 PM
  4. Records per Page in a Report
    By JackA in forum Reports
    Replies: 6
    Last Post: 08-03-2011, 09:33 AM
  5. show 4 records in each report page
    By kareem_h in forum Reports
    Replies: 5
    Last Post: 11-10-2010, 10:11 PM

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