Create Access reports from Form and save as PDF -


im using access database create alot of reports - report made using query source, in query use form criteria open page in form data used in report. save report pdf , click in form run next set of data. time consuming when have on 500 reports make. there way make function, vba or macro run through pages in form , save each report pdf?

my form named norwf, query norwq , report norwrap

i hope makes sense , there faster way make projekt run smoothly.

if place button on form, code behind should work:

dim rst      dao.recordset  dim strreport        string dim strreportfile    string  strreport = "norwrap" 'set rst = me.recordsetclone set rst = currentdb.openrecordset("norwq")  'use query while rst.eof = false    strreportfile = rst!id & ".pdf"   ' give report name based on field name   docmd.openreport strreport,acviewpreview , , "id = " & rst!id   docmd.outputto acoutputreport, strreport, acformatpdf, stroutfile   docmd.close acreport, strreport    rst.movenext  loop 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -