Solved

Access 2010 Hyperlink in Listbox

Posted on 2013-06-25
4
1,727 Views
Last Modified: 2013-06-30
I created a table and added a hyperlink record. With the table opened I can click the record and the hyperlink opens a PDF document. I then created a form and added a List Box to the form using the wizard. I used the List Box Wizard to get the values from the table. The record shows when I run the form but when I click on the hyperlink record it doesn't open the PDF or respond to the click. Any ideas what I could be doing wrong?
0
Comment
Question by:rfgraham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 150 total points
ID: 39276902
That is not a built in function of the list box control.

I regular do what you want using a do this using a sub form in continuous view mode. I format it  to look a lot like a list box.

You could try adding code to the List box's on click event.
0
 
LVL 48

Assisted Solution

by:Dale Fye
Dale Fye earned 150 total points
ID: 39277513
As HiTech mentioned, I would use the Click event of the listbox and the Followhyperlink method, something like:

Private Sub lst_Hyper_Click

    application.followhyperlink me.lst_Hyper_Click.column(x)

End sub

Then replace the "X" with the appropriate column from the listbox.  If you are only displaying the hyperlink in the listbox, and don't have additional fields in the query that is the rowsource of the list, then you can just use:

application.followhyperlink me.lst_Hyper_Click
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 200 total points
ID: 39287700
<No Points needed>

This is why unless it is absolutely necessary, you may not want to use a "Hyperlink" datatype. (emails are most problematic, because the hyperlink datatype adds specific formatting...)
fyed and THTC's posts will work just fine if the field is a regular text field...

Also note that currently SQL server does not support Hyperlink datatypes, so when the time comes to upgrade, they will have to be redone as text datatypes anyway...

JeffCoachman
0
 

Author Closing Comment

by:rfgraham
ID: 39288529
I appreciate all your input. I have decided to use a Combo Box. The reason for the hyperlink is to make it easier on the user (i.e. not having to access a file in a directory somewhere if they need more information on the topic that is displayed on the UI). I appreciate your input JeffCoachman in regards to SQL server hyperlink datatypes not being supported.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question