L
laura.dodge
Hi, I've tried to search online for what seems like it should be a
simple solution, but I still can't figure it out. I have a form in
Access 2003. I have a control called PubLink1 that is a hyperlink.
When I click on the hyperlink the pdf opens perfectly. However, to
make the form more user-friendly (and to save space) I would like to
create a command button called CmdPubLink1 that says 'Open
Publication' instead of having the user click on the hyperlink. Here's
what I have so far:
Private Sub CmdPubLink1_Click()
On Error GoTo Err_CmdPubLink1_Click
Application.FollowHyperlink PubLink1, , True
Screen.PreviousControl.SetFocus
DoCmd.FindNext
Exit_CmdPubLink1_Click:
Exit Sub
Err_CmdPubLink1_Click:
MsgBox Err.Description
Resume Exit_CmdPubLink1_Click
End Sub
When I click on the command button I get the warning message "Opening
"" Hyperlinks can be dangerous..." And then "Microsoft Office Access
can't follow the hyperlink to '#S:\File.pdf#'."
Does anyone see what I'm doing wrong? Thanks so much for your help!
simple solution, but I still can't figure it out. I have a form in
Access 2003. I have a control called PubLink1 that is a hyperlink.
When I click on the hyperlink the pdf opens perfectly. However, to
make the form more user-friendly (and to save space) I would like to
create a command button called CmdPubLink1 that says 'Open
Publication' instead of having the user click on the hyperlink. Here's
what I have so far:
Private Sub CmdPubLink1_Click()
On Error GoTo Err_CmdPubLink1_Click
Application.FollowHyperlink PubLink1, , True
Screen.PreviousControl.SetFocus
DoCmd.FindNext
Exit_CmdPubLink1_Click:
Exit Sub
Err_CmdPubLink1_Click:
MsgBox Err.Description
Resume Exit_CmdPubLink1_Click
End Sub
When I click on the command button I get the warning message "Opening
"" Hyperlinks can be dangerous..." And then "Microsoft Office Access
can't follow the hyperlink to '#S:\File.pdf#'."
Does anyone see what I'm doing wrong? Thanks so much for your help!