Export report to PDF and copy to LAN automatically

jereece

Registered User.
Local time
Today, 13:52
Joined
Dec 11, 2001
Messages
300
I don't know if this is the right place to post this, but here goes.

I have 4 reports in an Access database that I alone run. I store the database on a LAN that out group alone has access to. However, I need others who do not have access to our LAN to view the reports. So is it possible to maybe run a batch file, macro or something that would do the following every 4 hours?

1. Run all 4 reports
2. Save the reports as PDF (I have a PDF program installed on my machine)
3. Copy the PDF reports to a separate LAN that the other do have access to.

I was thinking if this could be done via batch file, I could use Windows Scheduling to launch the batch file every 4 hours. However, I don't have a clue if it can be done in a batch file and if so how to do it. Or if there is a better way.

As always, I really appreciate the help.

Jim
 
I don't think that is possible just with a Batch file. What you could do is create a seperate db and link all your tables to this db and copy your 4 reports and the queries behind the reports to your new db. Then create a form in the new db. Just make it an unbound form no controls needed. Then set this form as the db's startup form. Next create a module and make a procedure to export your 4 reports and then close the db and call the procedure from your forms On_Load event. So basically everytime this new db is opened it will export your 4 reports and then close. Now just set the Windows Schedule to open the db every 4 hours.
 
I understand what you are saying except this part
create a module and make a procedure to export your 4 reports and then close the db
I don't know how to do that and can you export them as PDF? If so, how?

Thanks,
Jim
 
as far as exporting to pdf, you have a number of options how to do that. the easiest way, i think, is to install a pdf printer (ie PDF Creator or Adobe Acrobat) and set that as the default printer for the reports. Then, all you have to do is create a procedure which has 4 docmd.openreport statements, one for each report you need opened. if you configure the printer accurately, you can set it to automatically create the documents without prompting you. As soon as the reports are created, you can execute the scripting to move the files wherever you want.
 

Users who are viewing this thread

Back
Top Bottom