Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print multiple reports

Status
Not open for further replies.

HogansHero

Technical User
Nov 16, 2008
3
CA
I have a database that serves as a incident reporting system. What I would like to do is be able to select from a list of all the reports I have the reports I would like to print. Thus eliminating the need to go to each report and print it.

Can anyone help?

Thanks in advance.
 
Create a table with a report name and, perhaps, a 'friendly' name. Use this as the basis of a multi-select listbox, then provide a print button to iterate through the selection printing each item.
 
How are ya HogansHero . . .

If you want to do this without the extra table advised by [blue]Remou[/blue] (albeit the friendly report name may be desireable), in the [blue]RowSource[/blue] of a Listbox or Combobox, copy/paste the following:
Code:
[blue]SELECT Name FROM MSysObjects WHERE ([Type]=-32764) ORDER BY Type;[/blue]

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Perhaps I should have explained that I am fairly new to this.

What your saying is create a "print reports" form based on a "Reports" table. With the field names being that of all of the reports that I have. What I would like to do is just be able to check a box beside each report name and hit a print button at the bottom. The printer would then print all the reports that you checked off.

Thanks in advance.

Scott
 
Have a look at this article
It is on how to create a list from a multi-select combobox, but you can see that instead of building a list, you can say:

Code:
    If Me!NamesList.ItemsSelected.Count <> 0 Then
        For Each oItem In Me!NamesList.ItemsSelected
            DoCmd.OpenReport Me!NamesList.ItemData(oItem), acViewPreview
        Next oItem
    Else
        MsgBox "Nothing was selected from the list", vbInformation
        Exit Sub  'Nothing was selected
    End If

If you use checkboxes, you will need to add a new checkbox everytime you want to add a report.
 
Perfect! I just have to tweak it to suit my needs.

Thanks.
 
Note that Access does not distinguish between reports and subreports in the MSysObjects table and that MSysObjects must never be tampered with.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top