Output a Report to view(only) in external format (1 Viewer)

owensbri

Registered User.
Local time
Today, 15:36
Joined
May 5, 2012
Messages
28
I've created a database for the single purpose of tracking training expiration dates for employees. When opened, it displays a report that shows a list of employees who's training dates are nearing expiration. Combined with Windows Task Scheduler, I have it set to run on a Supervisor's computer so that each day when he logs in, it runs the report for him.

I would like to have Access open, calculate the results, and then output the report (in a read only format, I do not wish to save the file first,) to an external format such as Word, Excel, or as a .PDF file. The Database would then automatically close.

Basically, I want to the supervisor to log in, maybe see the DB come up briefly, but then go away leaving him with just a simple report up on his screen that isn't reliant on Access remaining open.

I can successfully use the OutputTo command as a PDF file, but that prompts the user to save the results as a file first. I simply want it for viewing. They could then decide to save or discard it without saving.

Any ideas? Thanks in advance.
 

owensbri

Registered User.
Local time
Today, 15:36
Joined
May 5, 2012
Messages
28
I figured it out. Basically I created a blank form, launched by an Autoexec macro, that has the following code in the OnLoad event:

DoCmd.OutputTo acOutputReport, "rpt_InfoReport", acFormatPDF, "InfoReport.pdf", True
DoCmd.Close acReport, "rpt_InfoReport", acSaveNo
DoCmd.Quit acPrompt

The MS Access Database opens, the Autoexec opens the blank form, the blank form outputs the report, then the whole thing closes leaving a PDF report on the screen. The supervisor can then do whatever they wish with the open PDF report.
 

Users who are viewing this thread

Top Bottom