Hyperlink reference

B

Bill

I have a field in one of my tables to store a hyperlink to
an Excel file. But now I'm told that it could be from 1-5
files and the User would like to just reference a folder
and starting point in that folder so that when someone
wants to see the graphs they will be lead to the
appropriate folder and the group of files whose names
start with the same text. Is that possible, am I making
sense?
 
J

John Nurick

Hi Bill,

You can store a hyperlink to a folder (it will open in a Windows
Explorer or My Computer window) but I don't think it's possible to store
a hyperlink to a group of files.

One thing you could do is change the field type from Hyperlink to Text
and write code to handle things when the user clicks on it. Something
like this:

1) Take the value in the field.
2) If it contains one or more "#" characters, parse it with the
HyperLinkPark() function. Otherwise assume that the whole thing is a
URL, UNC or local address.
3) If the address looks like a Windows folder or wildcard filespec, use
the code at http://www.mvps.org/access/api/api0001.htm to invoke a File
Open dialog showing that folder or those files.
4) Otherwise (i.e. the address points to a web resource or a single
file) launch it with Application.FollowHyperlink.
 

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