Hyperlink in MS Access report

I created the MS Access 2013 database to track all messages regarding the trading site. The tables and columns related to this question are Ads with column identifiers (Number) and Link (Hyperlink) and Notes with the Announcement column, which contains the ID of the advertisement. The "Link" field contains an http link to an advertisement on a website.

Itโ€™s easy to include the Link column in the reports, but to save space, I would like to turn the ID field into a hyperlink with the identifier in the form of the displayed text and the contents of the Link column as the target. How can i do this?

I already played a little with the properties of the ID column and set "Is Hyperlink" to true and "Target for Hyperlink" to "SELECT" # and Link and "#" AS URL FROM Advertances ", but thatโ€™s not the case, thatโ€™s the work. WHERE, but how can I access the value of the identifier field of the corresponding record?

+5
source share
1 answer

To illustrate, I created a table named [LinkTest] with columns

Identifier - AutoNumber, Primary Key
SiteName - text (255)
SiteURL - hyperlink

and data

ID SiteName SiteURL -- -------------- --------------------------- 1 Qaru #http://stackoverflow.com/# 2 YouTube #http://www.youtube.com/# 

I created a new report with a text box for the URL

OriginalDesign.png

and it displayed the URL as expected.

WithSiteURL.png

To display SiteName as a hyperlink, I just edited the control source to add the site name to the text # -delimited hyperlink

ModifiedDesign.png

and the text box now displays SiteName as a link to the url ...

enter image description here

... because the text field (where the cursor points to the cursor) now contains

 Stack Overflow#http://stackoverflow.com/# 
+6
source

Source: https://habr.com/ru/post/1206166/


All Articles