Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display hyperlink in Access form (Datasheet View)

Tags:

ms-access

One field of the table is a memo field that contains the full path of a file.

I am to display the path as a hyperlink in a form in datasheet view.

This is what I have done in the Property window for that column:

  • Is Hyperlink: Yes
  • Display as Hyperlink: Always

Now the value of that column does display like a hyperlink, in blue color and with a underline. But if I click the hyperlink, it does not take me to anywhere.

There is a property named "Hyperlink Target", which I think must be the place to fix that. But nowhere can I find documentation for the value for this property. I tried "_blank" as if it were Html, but it fails. Can anyone tell me what is supposed to be in that property so that the hyperlink will work?

Thank you!

like image 365
Blaise Avatar asked Feb 08 '13 18:02

Blaise


People also ask

How do I add a hyperlink to a data sheet?

To switch between Design and Datasheet views of your data, click the View button on the Ribbon’s Home tab or its Design tab. It’s the first button, and appears either as Once you’ve created your hyperlink field, enter your hyperlinks into the field with the Edit Hyperlink menu.

What is the hyperlink field in access 2016?

Access 2016 provides a handy field type specifically designed for dealing with the special data that are hyperlinks. As you probably guessed, this type is called the Hyperlink field. Adding a Hyperlink field to a table doesn’t require special steps.

How do I view a form in datasheet view?

To see a form in datasheet view, display the form, click the down arrow next to the View button and choose Datasheet View. The Datasheet View shows the records in an Access table. In addition, each row is one record and the columns are the fields from the table's definition.

How do I add fields to a datasheet in access?

In the Fields available in related tables section, expand the table that contains the first field that you want on your datasheet, and drag the field onto the form. Access creates a datasheet and adds the field to it. To add additional fields to the new datasheet, you must first click the datasheet to select it.


2 Answers

In your form's record source query, concatenate a hash character (#) to both ends of the memo field value.

SELECT '#' & your_field & '#' AS URL
FROM YourTable;

Then if your field contained https://www.google.com/webhp?source=search_app, the text box value would be #https://www.google.com/webhp?source=search_app#. And clicking the text box bound to that URL would use the FollowHyperlink method to open it in the associated application.

If you're talking about a local file path rather than a web URL, that method will still work.

like image 142
HansUp Avatar answered Oct 17 '22 21:10

HansUp


Are you really attached to this idea? I would not recommend it because it makes editing the data a nuisance. I prefer FollowHyperlink in the double-click event. FollowHyperlink will open most things:

 FollowHyperlink "c:\docs\word.doc"
 FollowHyperlink "mailto:[email protected]"
 FollowHyperlink "http://stackoverflow.com
 FollowHyperlink Me.MyDocs
like image 4
Fionnuala Avatar answered Oct 17 '22 23:10

Fionnuala