Results 1 to 2 of 2
  1. #1
    Vegaanders is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2016
    Location
    Cyprus
    Posts
    29

    Print one by one report

    Hi!
    This is perhaps not even an access question but I will give it a go.

    One thing my project does is to make payslips. When I want the payslips I put in the month I want as a parameter and then get the payslips, one page per employee in preview mode.
    Now to the question. Is there any way to get access to print them out one by one as pdf. (I use Cute writer) Naming them f.ex. as the employment ID. This would ease the workload big time.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Loop thru a list of employees in a list box, then print to pdf,
    Make a list box on a form. This will have the name,ID of the people to send to.
    Then click a Print button to run loop below.
    It will run thru the list and make the report.
    Code:
    '------------
    Public Sub ScanList()
    '------------
    Dim vTo, vSubj, vBody, vRpt,vID , vFile
    Dim vFilePath
    dim i as integer
    For i = 0 To lstEmps.ListCount - 1
       vID = lstEmps.ItemData(i)
       lstEmps = vID 
       
       vFile = vID & "-payslip.pdf"
       
         docmd.OutputTo acOutputReport ,"rptPayslip", acformatPDF, vFile
    Next
    End Sub

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

Similar Threads

  1. Replies: 5
    Last Post: 08-06-2015, 03:26 PM
  2. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  3. Replies: 6
    Last Post: 03-01-2014, 07:07 AM
  4. Replies: 1
    Last Post: 12-03-2012, 03:15 PM
  5. Replies: 0
    Last Post: 02-22-2011, 05:04 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