I want to include as data, hyperlinks to files in a certain folder tree on
disk. Which disk that folder tree will be on, may vary from PC to PC, so I
would like the link to be relative, so that I can put the folder tree on D:
on some PCs and C: on others, or maybe some arbitrary network drive.
Thank you for any advice, insight or pointer to resources.
One option is to set the database's HyperlinkBase property. The help
file topic "Set a hyperlink base for an Access file" tells how to do it
manually in the Database Properties dialog, but you can probably do it
with code at run time (I think I tried this once, but I can't remember
how it came out). My guess is that you have to create the propery if it
hasn't been previously set. This would be one of the properties in
CurrentDb.Containers("Databases").Documents("SummaryInfo").Properties.
Another option would be not to use hyperlink fields (which I find
cumbersome anyway), but to use text fields instead. Then when you want
to follow one of these pseudo-hyperlinks, you assemble the complete path
from the data and use Application.FollowHyperlink to follow it. This
would be my choice.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)