Add hyperlink

  • Thread starter Thread starter Crystal
  • Start date Start date
C

Crystal

I have a table with a hyperlink field. I need to
programmatically loop through the table and add a
hyperlink based on info in other fields.

Problem:
The hyperlink.address property of a hyperlink field is a
read-only property. So is Hyperlink.TextToDisplay. Is
there a way around this? There are over 800 hyperlinks
that need to be added and I really need to do this in
code.

Any suggestions would be greatly appreciated,
Crystal
 
Use an update query.

This example assumes:
- you have a field named "CompanyName", and
- every company's web address is www.WhateverCompany.com, and
- you want the hyperlink to display the company name.

1. Create a query into this table.

2. Change it to an Update query: Update on Query menu.
Access adds an Update row to the grid.

3. Drag the hyperlink field into the grid.

4. In the Update row beneath this field enter:
[CompanyName] & "#http://www" & [CompanyName] & ".com#"

For more information, see:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
 
Back
Top