P
Pam
Hi,
I recently posted the message below and someone asked me to enter the code I
am using and I did, but they never replied back. I'm posting again in the
hopes that someone will have answer.
First Message:
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
Second Message with Code:
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
I recently posted the message below and someone asked me to enter the code I
am using and I did, but they never replied back. I'm posting again in the
hopes that someone will have answer.
First Message:
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
Second Message with Code:
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