0

I need to add a web address to the end of a record item in an Access table that also serves as an active link.

e.g.

Currently the item says...

"Do this thing this way and get this result"

And I want it to say...

"Do this thing this way and get this result (http://www.question.com/answer/thankyou.php)"

where the web address is the standard blue color and is an active link when the item is used to populate a report.

Is this possible, or will I need to add a separate element to the report that contains the web address link?

enter image description here

Any other ideas out there? Is there any way to make a substring within a long text field an active hyperlink on a report?

I discovered just now that adding another text box to hold the hyperlink is not an option as it will sometimes superimpose the last part of the long text field (if present).

So in some cases, this long text field contains...

Line 1 of text (carriage return) Line 2 of text (EOL)

and other times it contains just...

Line 1 of text (EOL)

The goal is to create a field that can (sometimes) contain a URL string that is clickable on the final report...

Line 1 of text (carriage return) URL string that becomes a true hyperlink on the report (carriage return) Line 2 of text (EOL)

and sometimes...

Line 1 of text (carriage return) URL string that becomes a true hyperlink on the report (EOL)

I can't just put a hyperlinked text box in that zone because if line 2 is present for that record it will be superimposed by the text box.

Splitting the long text field with an extra line of white-space (i.e. an additional carriage return) between line 1 and line 2 is not an option either.

MBB70
  • 375
  • 2
  • 16
  • Reports in PrintPreview are not interactive. There is no clickable anything. ReportView might allow this. – June7 Nov 01 '18 at 20:54
  • Yes, ReportView allows this. The PDFs saved via VBA also have clickable links. – MBB70 Nov 01 '18 at 21:00
  • I'm trying to learn if a field with a substring web-address passed into a report from a table can be wrapped in something to make it an active link when it gets to the report. – MBB70 Nov 01 '18 at 21:02
  • Easiest is probably to have a label with caption "Do this thing this way and get this result" that is associated with a textbox bound to field. Is the field a hyperlink type? – June7 Nov 01 '18 at 21:11
  • No it's not. It's long text. I was hoping there was some kind of format or wrapper I could put around the web link substring and make it live when it got to the report...to have the http:// flag the report that this is a web address and that it should be converted into a hyperlink...you know like what happens in all other Office applications when you type in a web address...it gets automatically recognized. – MBB70 Nov 01 '18 at 22:23

1 Answers1

0

Value saved in an Access Hyperlink field is composed of 3 parts separated by # character:

display text # file name or URL # any reference within the file

However, if not using Hyperlink field, it can be emulated by concatenating a URL string. The string can be provided by a text field. Concatenate in query or textbox ControlSource. This will be a clickable link in a textbox with the IsHyperlink property set to Yes.

"SomeTextHere#" & [fieldname] & "#"

For more info review: http://www.allenbrowne.com/casu-09.html

June7
  • 19,874
  • 8
  • 24
  • 34