How to display a hyperlink in an access form (data table view)

One table field is the memo field, which contains the full path to the file.

I have to show the path as a hyperlink in the form in the data view.

This is what I did in the properties window for this column:

  • Hyperlink: Yes
  • Display as hyperlink: Always

The value of this column is now displayed as a hyperlink, in blue and underlined. But if I click the hyperlink, it will not lead me to anything.

There is a property "Hyperlink", which, I think, should be a place for correction. But nowhere can I find documentation for the value for this property. I tried "_blank" as if it were Html, but it fails. Can someone tell me what should be in this property for the hyperlink to work?

Thanks!

+4
source share
3 answers

In your form write source request, concatenate the hash symbol ( # ) at 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 value of the text field would be #https://www.google.com/webhp?source=search_app# . And by clicking the text box associated with this URL, the FollowHyperlink method will be used to open it in the corresponding application.

If you are talking about a local file path, not a web URL, this method will still work.

+4
source

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

  FollowHyperlink "c:\docs\word.doc" FollowHyperlink "mailto: sample@example.com " FollowHyperlink "http://stackoverflow.com FollowHyperlink Me.MyDocs 
+3
source

I tried to figure this out by adding a field to it. The solution I found is to write a SQL Update query:

 UPDATE TableName SET Yahoo = [FieldName]&'.Y'&"#"&"http://finance.yahoo.com/q?s="& [FieldName] & "&ql=0"&"#" WHERE [FieldName]IS NOT NULL 

My specific use was intended to refer to Stock Tickers, but it could be used for other purposes. The problem that was solved for me was an access error, considering that "#" is for a date.

0
source

All Articles