Add hyperlink field

  • Thread starter Thread starter Harley Feldman
  • Start date Start date
H

Harley Feldman

I want to add a hyperlink to ADO records in one of the fields. I use the code below:

With rst
.AddNew
.Fields("Recipe") = RecipeName
.Fields("Type") = ""
.Fields("File") = "Recipes\" & RecipeName
.Update
End With

I am left with the correct address in the "File" field, and it looks like a hyperlink, but it is just a text string. How can I make the "File" field be a real hyperlink?

Harley
 
You need to supply the display text as well as the address, and include the
#, e.g.:
.Fields("File") = RecipeName & "#Recipes\" & RecipeName & "#"

Explanation in:
Introduction to Hyperlink fields
at:
http://members.iinet.net.au/~allenbrowne/casu-09.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I want to add a hyperlink to ADO records in one of the fields. I use the
code below:

With rst
.AddNew
.Fields("Recipe") = RecipeName
.Fields("Type") = ""
.Fields("File") = "Recipes\" & RecipeName
.Update
End With

I am left with the correct address in the "File" field, and it looks like a
hyperlink, but it is just a text string. How can I make the "File" field be
a real hyperlink?
 

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

Back
Top