Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2010 Hyperlink in Listbox

Posted on 2013-06-25
4
Medium Priority
?
1,800 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 600 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 600 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 800 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

715 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