Hyperlinks

S

sd

One of the fields in our database is for a hyperlink to
pdf and doc files. In a housekeeping effort someone
decided to change the name of the folder and so now none
of our hyperlinks are working. We could easily rename the
folder but have decided the new name is more appropriate.
Two things: is there a way to programmatically
search/replace the folder name in the path. If I run a
query against that field, I get the display text not the
file path name and is there a way to protect against this
other than removing privileges?
 
D

Doug Munich

Hmm, those hyperlink fields are strange items. In the help is describes
them as text values with a format "Name#URL#Item" where Name is what's
displayed and URL and Item are the location and (if required) sublocation of
the object to be displayed. You can see this if you look at these fields
programmatically, e.g. with code like:

=====================================
Public Sub HyperlinkAnalyzer()

Dim rs As DAO.Recordset
Dim str As String

Set rs = CurrentDb().OpenRecordset("tblImageHyperlinks")
rs.MoveFirst
While (Not rs.EOF)
str = rs.Fields("Hyperlink").Value
MsgBox "value = " & str
rs.MoveNext
Wend

Set rs = Nothing
End Sub
================================

You could probably accomplish what you want by looping through and modifying
the field values as text items. There is also a hyperlink data type in
Access which could probably be used in place of string.

Doug
 

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