By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

Opening PDF

P: 1
I am trying to have Access open PDF's via hyperlinks in a query, but from a command button on a form. It actually opens the correct record in datasheet view, and can then click the hyperlink to open in Acrobat, but get an error "Unable to open Query!qryLithLogLinks![Lith_Logs]. Cannot open the specified file" I have enabled these references: Adobe Acrobat 8.0 Type Library, Acrobat Access 3.0 Type Library, Adobe Acrobat 8.0 Browser Control Type Library 1.0. What I would really prefer it do is open either a folder (from hyperlink path in query) or PDF (with default application), as some of the records may or may not not have an associated PDF.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command59_Click()
  2. Dim ObjPdfApp As Object
  3. Set ObjPdfApp = CreateObject("AcroExch.App")
  4. DoCmd.OpenQuery ("qryLithLogLinks")
  5. End Sub
Apr 23 '09 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,709
I have split your post out into its own thread as posting in the other thread was a hijack, and not allowed.

I have also bumped it to give it a chance of being seen by some of our experts.

I'm afraid from my point of view your code makes little sense. I don't know much about PDFs, but some of your code seems to want to use Application Automation, but then you run a standard SELECT query which is unrelated.
Apr 25 '09 #2

ADezii
Expert 5K+
P: 8,679
@bg3075
Does the *.PDF File have to exist as a Hyperlink or can the Path to the File be stored, and opened via the API or some similar logic?
Apr 25 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.