If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hyperlinks
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? |
#2
|
|||
|
|||
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 "sd" wrote in message ... 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? |
#3
|
|||
|
|||
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 "sd" wrote in message ... 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? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DELETING ALL HYPERLINKS | CRAIG DONOVAN | Powerpoint | 3 | August 28th, 2004 04:17 PM |
Using VBA to search for hyperlinks in textboxes | Adelia | Powerpoint | 1 | August 27th, 2004 03:05 AM |
Editing Intra-Network Hyperlinks in a Spreadsheet | Winston | General Discussion | 2 | July 20th, 2004 01:30 AM |
What problems can I expect with 1000 hyperlinks? | Peter Noneley | Links and Linking | 0 | November 25th, 2003 11:04 AM |