i want to write code instead of usingreport for print data in acce

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help me i want to print query throught code because i want to need
some loop and conditions for print data ! thanks in advance
 
What have you tried? Do you know how to create a recordset and loop through
it?

You can use the Print method within a report to print values on the report.
 
I'll give an example of how to use code to print reports, I hope it will help
A table with two fields containing a report name and a criteria

dim MyDB as database, MyRec as recordset
set MyDB=codedb
set MyRec=mydb.openrecordset("Select ReportName, Criteria From ReportTable")
While not myrec.eof
docmd.openreport MyRec!ReportName, , , MyRec!Criteria
myrec.movenext
wend
 
Back
Top