Display Text Field but Use Hyperlink Field in report (1 Viewer)

brushbrooke

New member
Local time
Today, 13:58
Joined
Sep 14, 2011
Messages
3
I have a table with various items of info on plants. One of the fields, a Text Field is it's name [Taxon] another field, a Hyperlink Field is the URL of an image of that plant uploaded to Flickr [flickr URL].
In a report that will be published as a PDF I would like to display the [Taxon] field but have it appear as a hyperlink that works off the [flickr URL] field.
e.g.
For
[Taxon]: Lilium 'Garden Party'
[flickr URL]: httpxxxxxxx/6143164095/ :eek: can't type this field in propperly as I don't have the prerequisite 10 post to this forum, anyway it's a URL of a page on flickr. :eek:
I would like to show:
Lilium 'Garden Party' - (with a working hyperlink ;))

Is this doable & if so how?
Failing that could I maybe use a clickable proxy image, e.g. a wee gif/png icon of a camera auto hyperlinked to the contents of [flickr URL]?

At present I just have the hyperlink field as text after the text field in the pdf report which works but does't look too brilliant.

Been fumbling around in Access for years but have never got around to learning any of the less basic points, so I ask the help of those more able than I.:)
Ben:confused:
 

vbaInet

AWF VIP
Local time
Today, 13:58
Joined
Jan 22, 2010
Messages
26,374
See attached how it can be done in two ways. In the report take note of the properties of txtWebsite and txtAlias.

Open up the form and edit the code behind the command buttons to include the correct file paths. Test it and see how it works.
 

Attachments

  • HyperlinkInPDF.accdb
    480 KB · Views: 1,858

brushbrooke

New member
Local time
Today, 13:58
Joined
Sep 14, 2011
Messages
3
:D Cheers vbaInet,

I've got a tweeked version of the 1st method working now.
It would never have occured to me to hide the hyperlink field with sneeky white text behind a transparent text field, Ta.

Not all of the records have an image associated so to allow for these I've made a stack of 3 text boxes:
Control Source Bottom to top:
=[flickr URL] Formated with white text & a transparent background

=IIf([flickr URL],[Taxon],"") Displays when there is an URL in the [flickr URL] field, set format of text to look like a hyperlink with the "Is Hyperlink" set to yes & "Display As Hyperlink" set to Always & a transparent background

=IIf(IsNull([flickr URL]),[Taxon],"") On the top a normally formated transparent text box to display the plant name when there is no URL in the [flickr URL] field.

Seems to be working nicely,
Ta Again.
 

vbaInet

AWF VIP
Local time
Today, 13:58
Joined
Jan 22, 2010
Messages
26,374
You're welcome :)

In that case, no need for the extra textbox. You could just use Conditional Formatting and turn off the Is Hyperlink property. See attached.

NB: Remember to set the Allow Zero Length property of the URL field in the table to No.
 

Attachments

  • HyperlinkInPDF.accdb
    376 KB · Views: 1,165

Gasman

Enthusiastic Amateur
Local time
Today, 13:58
Joined
Sep 21, 2011
Messages
14,256
@vbaInet
Would just like to say Thank You for this tip.
You helped with this particular DB I wanted to do this for today, when I first created it, and 9 years on, are still assisting. (y)
 

Users who are viewing this thread

Top Bottom