Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you dynamically create hyperlinks in a report

Status
Not open for further replies.

rewdee

Programmer
Aug 17, 2001
295
US
Hi All

Say I have a report. I want to make one field in this report a hyperlink field. For example, say I have text field called "Girls" and I have the following names:

Barbie
Heather
Pam
etc.

I want the report to display the name but hyperlink them to an html file in the root directory "/girls/" & girlsname & "*.HTML".

I've tried changing the Control Source Property to:
Me.Record_Source = &quot;<A HREF=&quot; & Chr(34) & &quot;/TableDetails/&quot; & [Record Source] & Chr(34) & &quot;>&quot; & [Record Source] & &quot;</A>&quot;

but it gives me a out of memory error.

Can anyone help me??
Bill N
 
Just out of curisoity, why are using a hyperlink in a report ??? It won't load the browser and take you there, if that's what you are trying to do.

Do you just want it to LOOK like a hyperlink and print it ??

Anyway, if you have a table, create a field and set it's data type to hyperlink. The construct of the hypelink is display# So, Barbie (hmmm) would be stored as Barbie#c:\girls\Barbie.HTML#
Tyrone Lumley
augerinn@gte.net
 
Thanks for the reply.

The reason for the hyperlink in the report is that I want to convert the report to a static HTML page.

I had changed the field to hyperlink but the problem is that I also want to query with that field and I get an OLE error message. For example say I have a table called &quot;Boys&quot; and I want to see all the instances that exist in the table that Barbie has been with (eg. One to Many). If I make the changes to the table it has to detrimental effects:

1) I cannot query #c:\girls\Barbie.HTML# in the Girls table with Barbie in the Boys table.

2) The field should display Barbie not #c:\girls\Barbie.HTML#

Maybe the easiest thing to do is to create another field in the table exclusively for the hyperlink. If anyone has a better idea or another suggestion, I am certainly glad to read it.

Thanks,
Bill N
 
>>The field should display Barbie not #c:\girls\Barbie.HTML#<<

If you create a new field, and make the data type hyperlink, and enter data in this format (Barbie#c:\girls\Barbie.HTML#) it will display &quot;Barbie&quot; and point to &quot;c:\girls\barbie.html&quot;


Tyrone Lumley
augerinn@gte.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top