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!

Printing multiple reports?

Status
Not open for further replies.

sucoyant

IS-IT--Management
Sep 21, 2002
213
US
Hello all!

I have a combo box that is being pupulated by the following query: SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],3)="REP") ORDER BY MSysObjects.Name;

I was wondering if it is possible to print all of the reports that are being populated in the combo box with a command button?

Any help would be GREATLY appreciated!
 
In the On Click event of the button you could put...

(I am using DAO)

Dim db as DAO.Database
Dim rs as DAO.Recordset

Set db = CurrentDb
set rs = db.OpenRecorsets("SELECT MSysObjects.Name as RPTNAME FROM MsysObjects WHERE Left([Name],3)='REP'")

Do Until rs.EOF
DoCmd.OpenReport rs("RPTNAME")
rs.MoveNext
Loop

Hope this helps

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top