Results 1 to 3 of 3
  1. #1
    liamfrancis2013 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    7

    Printing a Report from a button using Code Builder

    I want to print my Report by using Code Builder, from a button, i want this report to fit to one page and be landscape. Anyone know the code for this?

    Currently on my button i have the code:

    Private Sub Command25_Click()
    DoCmd.PrintOut
    End Sub

    This obviously just prints it landscape and across multiple pages.

    Thanks,


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    YOU dont need to write any code....turn on the wizard, then grab a button , put it on the form
    the wizard will ask:
    what action, choose report
    pick your report
    choose either TO PRINTER, or PREVIEW

    done.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If you want one page, report must be designed to fit on one page.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Printing a Report from a button using Code Builder
    By liamfrancis2013 in forum Programming
    Replies: 3
    Last Post: 07-14-2015, 09:46 AM
  2. Replies: 3
    Last Post: 10-20-2014, 03:25 PM
  3. Printing report setup button not working
    By data808 in forum Access
    Replies: 10
    Last Post: 08-12-2014, 12:05 PM
  4. Macro Builder and Code Builder
    By data808 in forum Macros
    Replies: 2
    Last Post: 01-12-2014, 11:28 AM
  5. Replies: 3
    Last Post: 10-19-2011, 01:05 PM

Tags for this Thread

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