View Full Version : Exporting Report


momoko
06-30-2008, 05:27 PM
Hi,
I've quite a number of report that i'll output daily. Instead of coding it one by one in VB, how can I maintain a table on the report name and output them according to what has been added to the table?

Guus2005
07-01-2008, 01:13 AM
Create a recordset on the table and loop through it
dim strsql as string
dim rst as recordset

strsql="Select reportname from reports"
set rst = currentdb.openrecordset(strsql)

do while not rst.eof
docmd.openreport rst.fields(0), acNormal 'Print directly
loopTyped, not tested