Open PDF from combo box

goldriverdancer

Registered User.
Local time
Tomorrow, 09:34
Joined
Jan 4, 2010
Messages
13
Dear all,

I know there are heaps of stuff on PDFs in Access, but after much reading and experimenting, I still can't seem to find what I need.

I need to have a combo box that displays a few PDFs for each record in a form, and when the user clicks on one of them, it will open up. Also, I need different PDFs for different records.

I've tried using the followhyperlink method to open the file by placing the file path in the table associated with the record. But nothing I've tried works, and the MS Access Help doesn't say much about this method. A sample code would be very helpful, since I've come across posts that say this is possible, but I don't exactly know how to implement it.

Thank you for your help as I'm relatively new to access.


Stef
 
steph,

what you may want to do is create a seperate table on the many side of a one to many relationship, and then based on the record, display the "display names" in the combo box. Your form might have to be bound to an SQL statement that has a JOIN in it though, but there's nothing wrong with that.

I don't have time to make a sample, and of course it's a bit complex to do this, but it will work with the follow hyperlink method. If noone else has suggestions, try setting that up and posting what goes wrong, then people will be able to help you in real time, so to speak.
 
Thank you ajetrumpet for your reply.

I'll give that a go, but it'd be great to have just a bit more direction where to start, namely to get a different pdf opening for different records. I know the code to follow a single file path looks like this:

Application.FollowHyperlink "C:\blah.pdf"

but to use this method to follow file paths based on entries in a table, how should they look? I tried:

Application.FollowHyperlink "[FailureAnalysis - Subform]![Pump Model]"

but it doesn't work.

Thanks heaps for your help.

Stef
 

Users who are viewing this thread

Back
Top Bottom