Solved

Access 2010 Hyperlink in Listbox

Posted on 2013-06-25
4
1,646 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 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) 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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

734 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