AllExperts > Business Software 
Search      
Business Software
Volunteer
Answers to thousands of questions
 Home · More Business Software Questions · Answer Library  · Encyclopedia ·
More Business Software Answers
Question Library

Ask a question about Business Software
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer some questions on a wide variety of business applications, including MS Office, Lotus Smartsuite, Visio, Notes and many others.

Experience
I have over 16 years of experience as an IT professional, supporting a wide variety of business applications.

 
   

You are here:  Experts > Computing/Technology > Business Software > Business Software > Using VBA in Access to create code that will run in Adobe

Business Software - Using VBA in Access to create code that will run in Adobe


Expert: Scottgem - 4/9/2009

Question
QUESTION: I have a report that I have generated in Access.  this report is created to disperse information via Email.  I have also created a hyperlink on the PDF back to Access.

In order to not only open Access, but open a form and filter the form, I have use a batch file to store the information needed and then transfer it into Access.

In order to get the batch file to change to filter to the right record, I have used a File I/O to bring in the file and revise the text in the batch file before it is sent out.  I have done this because I couldn't figure out how to pass parameters into the batch file from a hyperlink.  

The only problem is, this code only runs when the report is opened in Access, not in Adobe as a PDF.  I need it to run in Adobe when the PDF document is opened as well.

Do you know how to write code in Access that will execute in Adobe during the open event?

ANSWER: I don't think you can control a PDF file from within Access. But I'm really not clear what you are trying to do. Can you give me an axamle and details steps from your workflow?

Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

QUESTION: Please look at the PDF Document of my system work as I use this example.

The first step would be a Project Manager to enter in a new project into the form, this form is the "Project Information Form".

At the bottom of the form, there is a command to send an email with a report in PDF form.  The report is a mirror image of the Form and populates from the same source as the form, but with a where clause from a field on the form.  

In the opening event of the form, there is code to create a batch file to get back to the database, I do this because I couldn't find a way to pass parameters into a batch file from the hyperlink.  

When the recipients of the email, those needing the information from the project manager, open the attachment in the email, adobe is opened and the file is displayed.  

When the link at the bottom of the PDF is clicked, the batch file is run and the original form opens up filtered to the right record.  

This way if something is wrong on the report that is sent out, those seeing the error, who have access, can go in and update it without having to navigate to the specific record.

Answer
Ok, so if I understand you, you are using a PDF to display the information entered for a new project. The PDF is e-mailed to someone who may or may not need to change the original data. Personally, I think you are trying to make it too automated. The e-mail should contain an ID for the project and/or the PDF should be named with that ID.

When the Access app is opened, have it open to a form to enter the ID and then bring up that record.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.