Software

Have Access automatically print your reports

If you need to print out an Access report by 10:00 every Friday morning, you don't have to do it manually. Follow these steps to create a macro to print the report and schedule it to run at that time -- automatically.

If you need to print out an Access report by 10:00 every Friday morning, you don't have to do it manually. Follow these steps to create a macro to print the report and schedule it to automatically run at that time:

  1. Open the database that contains the report.
  2. In the Database window, click Macro Under Objects.
  3. Click the Design button.
  4. Click in the first cell under Commands and select OpenReport.
  5. In the Action Arguments, click the Name Of Report box and select the name of the report you want to schedule.
  6. Save your macro.
  7. Go to Windows Explorer and open the folder where you want to save the macro shortcut.
  8. Right-click the Windows taskbar and click Tile Windows Vertically.
  9. Drag the icon of the macro you created from the Database window to the opened folder on your desktop.
  10. Close both windows.
  11. Click the Start button, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  12. Double-click Add Scheduled Tasks and then click Next.
  13. Click the Browse button.
  14. Navigate to the folder containing the shortcut to the macro command and select it.
  15. Click Open and then click Next.
  16. Click Daily.
  17. Click the arrows of the Start Time box until you reach 10:00 AM. Click Next.
  18. Enter your password in the Password text box.
  19. Enter your password in the Confirm Password text box and click Next.
  20. Click Finish.

Miss an Access tip?

Check out the Microsoft Access archive, and catch up on our most recent Access tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

12 comments
ptan
ptan

how do I get your print macro to work when there are parameter queries to complete?

Mojito05
Mojito05

This works great if your PC is powered on, but is there a way to schedule the report to run when your PC is off? I guess what I'm really asking is...can this be setup if the report is in the back end of a database that's on a shared drive? I know that making sure your PC is on when the report is scheduled to run would obviously solve the problem, but what if that isn't an option? I've looked for this answer before, but without any luck. Thanks!

mille383
mille383

Daily vs Weekly? I'm confused as to how setting this up for Daily at 10am gives you a report you need every Friday. Wouldn't it give you a report every day? Or am I missing something?

EmilyD
EmilyD

I read that and where is the automatic print capability? Sounds like at 10:00 it is going to open your rpt for you?

jteeple
jteeple

It appears this process will print to the default printer. I would like it to print to a PDF file. When I print to PDF I am promted for the folder to save in. Is there any way to do all this automatically? Thanks,

troisj
troisj

If you need date-based parameters you can use VBA-functions: Date, Week, DatePart etc. But if you need user-input (e.g. from an open form), then obviuosly that forms needs to be filled out by the user (which you don't want, because it undermines the concept of 'automation'). If you know what parameters you need (say 5 different departments), you could either create a query for each dept. and run them in sequence, or create a function that loops through the parameters (and passes them via Get-Set function). Or just create the whole thing in VBA (building the SQL string and passing it as recordsource to the report(s)) - the function being invoked by that macro.

pantera4life00
pantera4life00

A lot of motherboards have a feature that will wake them up when certain events occur. This can be at a certain time or event. Look at the documentation for your motherboard and see if you have any Wake-On features. If you do, then just wake up your pc a few minutes before it is scheduled to run. Usually this is done through wake-on-lan. There's also a bunch of utilities out there you can download and try. Google something like wake up pc at specific time http://en.wikipedia.org/wiki/Wake-on-LAN

DHMc
DHMc

For this example you would, in fact, choose the 'Weekly' option as well as the 'Friday' checkbox in the Scheduler.

DHMc
DHMc

The macro action should be 'OpenReport'. The Action Argument choice for 'View' should be 'Print'. Choosing 'Print Preview' here would simply open the report, but 'Print' sends it straight to the printer.

Mojito05
Mojito05

Check out ReportToPDF here: http://www.lebans.com/reporttopdf.htm I've been using it for over a year now and it does exactly what you're looking for. You'll just need to do a little tweaking to the modReportToPDF module.

ugek
ugek

this is very nice!...but I would also like to know if this would be possible for PDFs.

jteeple
jteeple

Thanks for the link. I have six reports I would like to use this with. Do you have an example of the input you use to run the code? I'm have trouble trying to get it to work. Thanks,