I have a form with hyperlink fields in both the header and detail sections.
The hyperlinks in the detail section are bound to the form's data source (a
query) and they work fine.
The hyperlinks in the header are unbound, don't work, and are filled with
the following:
Venue_filter_hyp = HyperlinkPart(DLookup("[Web addr]", "Venues", "[Name] = "
& Chr(34) & Venue_filter.Text & Chr(34)), acAddress).
The cursor doesn't change to the hand on mouseover and the field behaves
like a text field.
Additionally, all of the fields are defined as tabstop = no and locked = yes.
Hi Mark,
Tables have fields, but forms don't. I guess that what you have is
-in the detail section of the form, textboxes bound to hyperlink fields
-in the header, unbound textboxes.
If a textbox is bound to a hyperlink field it automagically displays the
link with an underline and responds to mouseover and clicks like a
hyperlink on a web page. With an unbound textbox, you have to code this
behaviour yourself.
So you'd use HyperLinkPart(DLookup(...), acDisplayedValue) to get the
text to display in the textbox, and then in the Click event procedure
use something like
Application.FollowHyperlink HyperLinkPart(DLookup(...), acAddress)
to follow the link.
>I have a form with hyperlink fields in both the header and detail sections.
>The hyperlinks in the detail section are bound to the form's data source (a
[quoted text clipped - 10 lines]
>
>Additionally, all of the fields are defined as tabstop = no and locked = yes.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
MarkB - 31 Dec 2005 14:51 GMT
That does the trick for following the hyperlink.
Now, how do I get the pointing hand to appear on mouse over.
Thanks
> Hi Mark,
>
[quoted text clipped - 34 lines]
>
> Please respond in the newgroup and not by email.
Rob Oldfield - 31 Dec 2005 18:44 GMT
You can turn a standard label into a hyperlink by just doing:
me.lblName.HyperlinkAddress = "http://www.whatever.com"
and you'd probably also want:
me.lblName.FontUnderline = True
me.lblName.ForeColor = vbBlue
> That does the trick for following the hyperlink.
>
[quoted text clipped - 40 lines]
> >
> > Please respond in the newgroup and not by email.
MarkB - 31 Dec 2005 21:20 GMT
Thanks Rob.
It looks like I'll be changing my unbound text boxes with hyperlinks to
labels.
> You can turn a standard label into a hyperlink by just doing:
>
[quoted text clipped - 55 lines]
> > >
> > > Please respond in the newgroup and not by email.
John Nurick - 31 Dec 2005 22:27 GMT
Thanks, Rob. I never knew that.
>You can turn a standard label into a hyperlink by just doing:
>
[quoted text clipped - 55 lines]
>> >
>> > Please respond in the newgroup and not by email.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.