I am attempting to attach a link to an image (pdf) on a form. And once linked give the user the ability to click on the control and display the pdf file.
I set up a control button for the user to navigate to the pdf, then store the location in a text box control, formatted as a hyperlink. However, clicking on the hyperlink doesn't do what I expected.
Can anyone show me what I am doing wrong?
Thanks in advance for your ideas.
Ken
Hyperlink on a Form
-
- 3StarLounger
- Posts: 308
- Joined: 24 Feb 2010, 13:41
Hyperlink on a Form
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78585
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Hyperlink on a Form
The contents of a hyperlink field have a special format:
displaytext#address#subaddress
where:
displaytext = the text shown in the text box; if omitted, the address is displayed
address = URL or path+filename
subaddress = name of the location within the web page or file to jump to (for example a bookmark); can be omitted
In your situation, you only need to specify the address surrounded by # characters:
Me.txtPDF_Location = "#" & strFile & "#"
displaytext#address#subaddress
where:
displaytext = the text shown in the text box; if omitted, the address is displayed
address = URL or path+filename
subaddress = name of the location within the web page or file to jump to (for example a bookmark); can be omitted
In your situation, you only need to specify the address surrounded by # characters:
Me.txtPDF_Location = "#" & strFile & "#"
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 308
- Joined: 24 Feb 2010, 13:41
Re: Hyperlink on a Form
Hans,
Thanks not only for the solution but the explanation of how hyperlink fields work!
You are the best!
BTW - congratulations on MVP
Ken
Thanks not only for the solution but the explanation of how hyperlink fields work!
You are the best!
BTW - congratulations on MVP
Ken
-
- Administrator
- Posts: 78585
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands