hyperlink

  • Thread starter Thread starter Pam
  • Start date Start date
P

Pam

Hi,

I have a DAP set up to review list of literature on hand. I need to have a
button set so that when clicked it will open pdf file located on server for
item number of literature for each record. I can get it to the file where
all the pdf's are located, but I cannot figure out the code for "where item
code = name of individual pdf file".

If anyone can help, I would greatly appreciate it. I have this working in a
regular Access form, but not for the DAP.

Thanks in advance,
Pam
 
Pam,

Any chance you can post the code you're currently using?

Ken
 
Thanks, Ken, for replying. Here is the code I'm using on a regular form. I
realize it won't be the same for the data access page. If you provide code
that will work like the regular form, I would certainly appreciate it. I've
spent a considerable amount of time trying various code and researching.

Private Sub Command21_Click()
Dim strPath As String

strPath = "\\dell4\databases\PDF\" & Me.[ITEM NUMBER] & ".pdf"
If Dir(strPath) = "" Then
MsgBox "There is no pdf for this brochure."
Else
Application.FollowHyperlink strPath
End If

End Sub

Thanks again,
Pam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top