Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks and linked tables 1

Status
Not open for further replies.

kentwoodjean

Technical User
Oct 19, 2002
376
US
I have my data file (PIDdata.mdb) and I have my reports file (PidRpts.mdb) of which the tables link to my data tables. I have a column on my main table that contains hyperlinks to word documents related to the subject matter. In my data file, these hyperlinks work perfectly. However, in my reports file, the hyperlinks in this same linked table do not work. When I click on one of the hyperlinks using the "hand", the field turns solid blue with yellow writing and I get the following error message: "Unable to open ..\File Links\001_02_2000.doc. Cannot open the specified file." Does anyone know why this linked table will not allow the hyperlink to function as it does on the data table?
 
Hi,

linking a table with a hyperlink field should work okay - it looks like the address has been typed in relative to the original database ("..\"). You can either enter the absolute paths for each hyperlink or set the base (define "..\") by going to File>database properties and entering the base path into Hyperlink base on the summary tab

HTH, Jamie
FAQ219-2884
[deejay]
 
I believe I had a problem similar to this a while back. I had a subform retrieve a record with hyperlinks. The hyperlinks would not work when clicked on -- very frustrating. I was half way through coding an API when realized I was retreiving the record with the ID file. I then realize that the hyperlink field displayed the correct data but was using the ID field. I actually had to specifically retreive the hypertext field into a combo box (or variation there of), instead of the relying on the linked field.
 
Jksmi

I have not had a lot of time to work on this. What I have had to do with my DB at work is remove the hyperlinks all together as it kept locking up the data file and the program was not working properly. It works good now, but as soon as that hyperlink was attempted, it locked up the DB.
I tried entering the hyperlink base but that did not seem to work. Maybe I am entering it incorrectly or on the wrong mdb. My PIDdata.mdb resides on a shared drive (snt212)and it only contains tables. My PIDrpts.mdb resides in the same folder and drive and contains the linked tables and all the queries, forms, repts etc. The excel doc that I imported to build my table had the hyperlinks to the word docs (all on the same Snt212), and it formated as ..Questions: (1)Does it matter which mdb I enter the hyperlink base? (2) I entered on the PIDrpts.mdb and when I did the brose for my hyperlink, I noticed that it showed the base as ..\ and the path as the \\snt212\etc....., and that link works. Will I need to reformat all the links that are currently there and show just the ..\?

Willir, I am not sure I am following exactly.
 
Hi,

open the linked table with hyperlinks. Right click on a hyperlink, from the contexttual menu select Hyperlink>Edit Hyperlink. What does it say in the Text to display field? and what does it say in the Type the file or Web page name?

The Hyperlink base need to be set in the database from where you click on the link. The base does not have to be the pat of the database but the path to the files. the ..\ tells the hyperlink to look in the parent folder for the base path. For example, if I have set the base to "C:\DEV\DATABASES\" and create a link to "C:\DEV\DOCS\MyDoc.doc" Access will store "..\DOCS\MyDoc.doc".

Alternatively, if the text in both the fields above start with "..\" you can just update your table to include the full (explicit) path rather than relative path, access stores hyperlinks in #'s so SQL would go something like that below [/b](test this on a backup first!)[/b]
Code:
UPDATE [i]YOUR_TABLE[/i] SET [i]YOUR_TABLE.YOUR_HLINK_FIELD[/i] = "#[i]\\YourUnc\Yourpath[/i]" & Right([i]YOUR_HLINK_FIELD[/i],Len([i]YOUR_HLINK_FIELD[/i])-4)
WHERE Left([i]YOUR_HLINK_FIELD[/i]],4)="#..\";

HTH, Jamie
FAQ219-2884
[deejay]
 
Thanks Jamie for all the help. I am on track now and things are working well. Sorry for the late reply, but my home computer went down on me Thursday evening, and I just got it working again today. All my test stuff was on that computer.

Again, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top