Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2013

    Unanswered: Need help printing multiple reports

    I have a database I created that has 24 separate reports that show different pieces of information. It takes a long time to choose each one and print it. I am looking for a way to create a single click that will print all the reports so I can walk away and do other things. Is there a way to do that? Ideally it would be nice to click on a box for each report I want to select and then have a print button that prints them all, but I have been able to find anything on printing multiple reports. Help!

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Here's a solution:
    1. Create an unbound form and place 24 checkbox controls, plus 2 command buttons named cmd_Print and cmd_Close.
    2. In the Tag property of each checkbox, put the name of a report. Identify each report in the label associated with each checkbox.
    3. In the Click event handler of the cmd_Print button, use the following code:
    Private Sub cmd_Print_Click()
        Dim ctl As Control
        Dim lngCount As Long
        For Each ctl In Me.Controls
            If ctl.ControlType = acCheckBox Then
                If ctl.Value = True Then
                    DoCmd.OpenReport ctl.Tag
                    lngCount = lngCount + 1
                End If
            End If
        Next ctl
        If lngCount = 0 Then
            MsgBox "No reports selected for printing.", vbInformation
            MsgBox lngCount & " reports printed.", vbInformation
        End If
    End Sub
    4. In the Click event handler of the cmd_Close button, use the following code:
    Private Sub cmd_Close_Click()
        DoCmd.Close acForm, Me.Name
    End Sub
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts