View Full Version : Select reports to print from a form


razorking
12-09-2009, 11:36 AM
I used to know how to do this - in fact did it somewhere - but since it was a long time ago and I have a lot of old databases floating around - I don't recall where this might be or how to do it. Not even sure if I can still do it in Access 2007. Hoping someone knows as it might save me some brain cells:

I have a database with several reports. I want to make a form where the user can select multiple reports to print at the same time. But I don't want to use a macro as the report selection might change. For example: print reports 1,3 and 5 or print reports 2 and 8. I think it involved using the system tables somehow. Can this be done in Access 2007?

Thanks!

pbaldy
12-09-2009, 12:41 PM
You're probably thinking about the MSysObjects table. You could base a listbox on SQL that pulled the reports from that table.

ajetrumpet
12-09-2009, 12:55 PM
you can also loop through the collections and pull the reports that way.dim rpt as string

for i=0 to application.reports.count-1

listbox.rowsource = listbox.rowsource & ";" & reports(i).name

next isomething like that