Solved

Create a hyperlink in Microsoft Access Databebase table.

Posted on 2014-12-09
7
521 Views
Last Modified: 2014-12-11
I have created a table that has a hyperlink field in it.  I have created a query that creates a string of data that represents the hyperlink.  I am able to update this information into the table.  The hyperlink is blue but when I edit the hyperlink it has not created and address for the hyperlink.  How can I accomplish this.  

Thanks so much.
0
Comment
Question by:fasse
[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
7 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 400 total points
ID: 40490093
I generally avoid hyperlink data fields in favor of text fields.  Then I use either the double click event of the field, or a command button beside the field to actually follow the hyperlink using the  Application.FollowHyperlink method.

One of several problems with the hyperlink datatype is that it is hard to query and edit.
0
 

Author Comment

by:fasse
ID: 40490102
I will think more about that.  I am travelling today so I will try it tonight and see what I think.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40490213
I am with @Dale Fye on this.
Only Access can deal with the hyperlink field, so the minute you look to do something with the backend other than Access, you have to take the hyperlink field apart back to it's constituent parts, which are basically
<A href="http://www.someplace.com">here</a> transformed into
here#http://www.someplace.com#

Now, you don't want the end-users in the tables anyway -- so what's the point of the hyperlink there?
Not much!
Now, since you need both the anchor and the address in separate fields, it's not much hassle to throw the 'here' into a visible textbox, the 'http://www.someplace.com' into a hidden textbox and have a command button that  does
Application.FollowHyperlink Me.HiddenControl.Value

It will be more robust over the long-term as @Dale Fye has alluded to.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:fasse
ID: 40490592
That makes sense so even if a I have multiple hyperlinks, when I click on the hyperlink I code that uses that  variable to change the hidden field then open the file.
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 50 total points
ID: 40490967
I agree with Dale and Nick - don't use Hyperlink data types. They are yet another bad design idea intended to make Access more "Excel-like".

As the others have said, use Application.FollowHyperlink to do this. FollowHyperlink depends on the file extension, and the Windows File Association data, to determine what to do with the file. So if you have this in the field:

C:\SomeFolder\SomeDocument.doc

And you have Microsoft Word associated with the "doc" extension, then Access will attempt to open that file using the current version of Word.
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 50 total points
ID: 40491838
That makes sense so even if a I have multiple hyperlinks, when I click on the hyperlink I code that uses that  variable to change the hidden field then open the file.

There are many ways to do it.  You can have textboxes on continuous forms with command buttons.
You can have a combobox that binds the anchor and link fields, with the width of the link field being zero, and then have the AfterUpdate event pull that .Columns(x) value and do the link.
Ditto for a listbox.

If you look at Application.FollowHyperlink you will see that for filesystem links like Word documents, you can have the document opened to specific bookmarks.  Lots of ways to do it.
0
 

Author Closing Comment

by:fasse
ID: 40494052
Thanks guys it works great.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Query - calculate End of the Month in Query 2 54
Can not open the Access Help ? 3 40
microsoft Access form help 5 15
2 Global Vars, 1 List Box 4 32
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

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