Add hyperlink

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
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top