Open a pdf file using hyperlink in access listbox

I have a listbox with the path and file name to a bunch of stored PDF's on our server. I am using the "Application.FollowHyperlink" function in the double-click event of my list box. The problem is that I want it to force the file to be opened using adobe reader but I'm not sure how to add that to the code in VBA. Is there a way to add some code to force it to use adobe reader?
LVL 1
Lawrence SalvucciInformation Technology ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
then try
    FilePath = Application.GetOpenFilename(filefilter:="PDF file (*.pdf), *.pdf")
    If FilePath = False Then Exit Sub

    AcrbtRdrPath = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe "
    Shell AcrbtRdrPath & FilePath, vbNormalFocus

Open in new window


Replace AcrbtRdrPath  with your path to the reader

Regards
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
How do I put my listbox in the code for the path to the pdf file? Right now i'm using this:

Application.FollowHyperlink Me.lstHeats

Open in new window

Rgonzo1971Commented:
what is the result of

Debug.Print Me.lstHeats
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Lawrence SalvucciInformation Technology ManagerAuthor Commented:
It gives me the path to the file I am trying to open as well as the file name.
Rgonzo1971Commented:
then try

AcrbtRdrPath = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe "
Shell AcrbtRdrPath & Me.lstHeats, vbNormalFocus

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
That got me closer. Now it's opening the reader but with a message that says "There was an error opening this document. Access Denied."
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
Nevermind. I got it working. There was a typo in the code. Thank you for your help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.