Hyperlink in Rich Text Field on Report (1 Viewer)

chugo

New member
Local time
Today, 11:55
Joined
May 2, 2013
Messages
9
Hello,

I am generating a report that needs to have a hyperlink in part of one of the fields. Prior to saving the field to the database I do a bit of VBA coding on it and add some HTML. The result is this in the field:


"There are two ways to book with your preferred rate: <br>
1. <b><a href="(took out the http for posting on this site) hamptoninn.hilton.com/en/hp/reservations/index.jhtml?hotel=ABGVA&corporateCode=12345">Click Here</a></b>! <br>
2. Call us directly or at 1-800-Hampton and use your Corporate ID 12345."


It works beautifully if you paste it into a web page but in the Access report, Access applies the Bold but just ignores the hyperlink.

This is Access 2013 with MS SQL Server 2008 backend. Everything I have read suggests that this should work and is supported. Is there some trick I'm missing?

Thanks
 

llkhoutx

Registered User.
Local time
Today, 13:55
Joined
Feb 26, 2001
Messages
4,018
Did you try to change the control format on the appropriate report section's OnFormat event?
 

chugo

New member
Local time
Today, 11:55
Joined
May 2, 2013
Messages
9
Do you mean testing to see if it's a hyperink and then formatting as a hyperlink if true? I thought about that, but it think it would hyperlink the whole control when I only want part of the text hyperlinked. I have a workaround that works but is far from optimal. I broke that field up into it's three separate lines and added 3 unbound fields in the page header of the report. I make the one with the link a hyperlink field and populate them in the OnLoad event of the report. The rest of the sections of this rate agreement go into the detail section. It looks right to the user but it's not very elegant. I really thought Rich Text fields could handle hyperlink tags.
 

Users who are viewing this thread

Top Bottom