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!
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
lngCount = lngCount + 1
If lngCount = 0 Then
MsgBox "No reports selected for printing.", vbInformation
MsgBox lngCount & " reports printed.", vbInformation
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