How to click through Access Report using SendKeys -
after having slogged through creating table of contents access report, have gotten point code works, , table of contents created.
as instructions microsoft state, need manually click through print preview until last page toc created. works.
how can click through access report using sendkeys?
here code far... works perfectly, except sendkeys nothing!
'click through report toc code executed dim rptcurreport report set rptcurreport = screen.activereport rptcurreport application.docmd.selectobject acreport, "rptfundselectionlist" .visible = true 'switch false once code ok 'go through pages = 1 .pages sendkeys "{pgdn}", true next 'docmd.close acreport, "rptfundselectionlist" end
i have managed solve issue myself. here code. may other poor soul!
'open report containing code create toc list of isins above docmd.openreport "rptfundselectionlist", acviewpreview, , strwhere set dict = nothing 'click through report toc code executed dim rptcurreport report set rptcurreport = screen.activereport rptcurreport application.docmd.selectobject acreport, .name .visible = true 'switch false once code ok 'go through pages sendkeys "{end}", true doevents application.docmd.selectobject acreport, .name docmd.close acreport, .name, acsaveno end
Comments
Post a Comment