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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks to File Problems 2

Status
Not open for further replies.

reddb43

Technical User
Jan 16, 2002
11
US
I have been trying to create hyperlinks in a field named Location. The field that has the actual File Name is in the previous field. These actual files all reside on a directory P:\MAINT\MaintDBase\DWFFiles\. There is over 4000 filenames in this table. This Table is called PrintFiles, and I also have a Form called this also. I would like to be able to click on the Hyperlink to this file and it opens the correct file for Viewing. I can get this Database to open the Folder where the Files are but not the exact File. Any help would be appreciated.
 
I'm confused by your first sentence (the hyperlink is in "Location" but it's really in another field?)
Please give an example of the data in the table PrintFiles.
What type of files are they?


Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Ok here is an example of my table:

PrintFile: Table

ID E,M,T# DWG FileName Location

01 T-182124-01 C T-182124 Hyperlink
02 T-182124-02 C T-182124 Hyperlink 03 T-182124-03 C T-182124 Hyperlink

E,M,T#: Represents the number assigned to a particular part

DWG: Represents that there is a CAD file on this part

FileName: Represents the actual File Name on the Server HardDrive Multiple E,M,T#’s can be on one CAD FileName

Location: Is the Hyperlink Field that I need to open the particular file like the first one. The path to the first one is P:\Maint\MaintDBase\DWFFiles\T-182124.dwf

Note: All file extensions do not show in the FileName . All these files were converted to a Autocad viewer files and were placed on the P:\Maint\MaintDBase\DWFFiles\
I might not even need a field with Hyperlink Locations in my Table PrintFile, but I need to access them somehow in a Formview or something. Hope this helps…………
 
hmmm....I don't have Autocad Viewer, but I found a .dwf file on one of our servers, created a hyperlink-type field in a table, put it on a form, clicked it and it seems to work fine. It tried to open the .dwf file but said there's not a program registered to open it. Which tells me it followed the link just fine (E:\blah\blah2\file.dwf) and would have opened it if I had the application installed.

Are you sure you have a file called T-182124.dwf in that folder?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes, I tried it with one of the filenames and made a hyperlink to the file in the Location Field and it worked like you just described, but I was trying to keep from doing this over 4000 times. Its close to 5000 DWF Files.
 
Sorry I guess I'm confused. Your original post sounded like you were having trouble opening the file and you wanted help with that: "I would like to be able to click on the Hyperlink to this file and it opens the correct file for Viewing". Now you say you can open the files, but don't want to open the files? I'm confused.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi, I'll take a stab at it. It sounds like you have the file names in the table and you wish to create hyperlinks to all those files and there is one hyperlink created.

Go back to table design view and set the hyperlink field back to Text.

Create a query and list all your dwf file names in one column. Drag the Hyperlink column in as well.
In the third field create an expression. Something like:

FullPath:"P:\Maint\MaintDBase\DWFFiles\"& FileName

Run the query. What you should see is one column with file names only, one blank hyperlink column and one column with the complete file path.

Copy and past the complete file path into the hyperlink column.

Go back to your drawings table in design view. Change the Hyperlink field back to Hyperlink.

You should now see about 4K hyperlinks.

Hope that helps.







 
This is great! This is just "about" what I need. It generates the hyperlinks to the files but just one problem. Each file in FileName does not have a file extension associated with it. It generates a hyperlink to each file like P:\Maint\MaintDBase\DWFFiles\T-182124. but it needs the .dwf after each file to work. I can go in and attach the .dwf to each FileName and the hyperlinks work. How can I get the extension on each FileName or Hyperlink?
 
In the instructions previously given (above), change:

FullPath:"P:\Maint\MaintDBase\DWFFiles\"& FileName

to

FullPath:"P:\Maint\MaintDBase\DWFFiles\"& FileName & ".dwf"

Karl
 
Thanks dRahme, and deduct. Its working like a champ! Thanks for all the help. This saves me a whole lot of time.
 
Glad it worked for you. Thanks for the star.
dRahme
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top