Edit Hyperlink problem

N

NetworkTrade

Access2003 split db.

In a Hyperlink field, Using Edit Hyperlink to locate file on the server, the
resulting link info is only part of the path. Folder/File

the link doesn't work

Am having to manually add the beginning portion of the patch i.e.
servername/folder1/etc ....and then it works

anyone seen this before...??
 
A

Allen Browne

IME, hyperlinks don't work so well. My preference is to use a Text field (or
even Memo if you have paths longer than 255 char.)

This solve several issues, such as:
- relative paths, when you want absolute (your example)
- file names that contain special characters (especially #)
- links that lie (showing one thing, but using a different address)

Use an API call for the user to select a path and file name to insert into
the field:
http://www.mvps.org/access/api/api0001.htm
 
N

NetworkTrade

First - thanks for reply. In researching (at your site and others), before
submitting a question, I had found this but it made me hesitate; twas 95/97
vintage, references to Excel, and a ton of code.....so thought I would double
check things.

In essence one is saying: "sometimes it just doesn't work right" ??

While the problem is that the link doesn't work; the real key need is to use
that standard browser methodology to find the file (& enter the path).
Everyone knows how to do that and when only the user knows where/which file
should be used - this classic browse-to-find is really key.

Although there are fixes, in my humble opinion, I hope you will get word to
MS that this is really something to manage more easily (without fixes) as I
foresee no end to the growth of images to the point where a DB may really be
just organizing links to other images (and video clips).... particularly
where it launches its own type viewer and is not embedded within an Access
object.

But back to today's reality; am thinking of a more simple solution to
insert the missing path info in the AfterUpdate event (i.e.
"server/folder1/") where the Edit Hyperlink is entering "folder2/file" .
This insert was what works if I manually type it in. Comment?? Would the
HyperlinkPart() be the best method??

Much thanks.
 
A

Allen Browne

You can cobble a hyperlink together by assigning:
displaypart#addresspart#
to the field. HyperlinkPart() is useful for breaking it apart again.

I can't recommend the general approach, though.
 
N

NetworkTrade

the PC that is having this problem, I notice when one opens Edit Hyperlink
that its default opening location is the folder on the server (rather than
say MyDocuments on its own local C:). Am wondering if this default setting
has any bearing on why it always results in just: folder/file

Despite the default, I have made a point to ignore it and browse via
Neighborhood, to server, to folder1 - - and saw the full path string being
built step by step - but upon file selection it only keeps the folder/file
info in the address field and throws out the other part of the path...
perhaps this is due to its default opening location.

Is it XP or Access that determines the default opening location and how does
one change it?
 
A

Allen Browne

From the Access 2003 help, fired from the VBA window, on HyperlinkAddress:

<quote>
The HyperlinkAddress property can contain an absolute or a relative path to
a target document. An absolute path is a fully qualified URL or UNC path to
a document. A relative path is a path related to the base path specified in
the Hyperlink Base setting in the DatabaseName Properties dialog box
(available by clicking Database Properties on the File menu) or to the
current database path. If Microsoft Access can't resolve the
HyperlinkAddress property setting to a valid URL or UNC path, it will assume
you've specified a path relative to the base path contained in the Hyperlink
Base setting or the current database path.
</quote>

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

NetworkTrade said:
the PC that is having this problem, I notice when one opens Edit Hyperlink
that its default opening location is the folder on the server (rather
than
say MyDocuments on its own local C:). Am wondering if this default
setting
has any bearing on why it always results in just: folder/file

Despite the default, I have made a point to ignore it and browse via
Neighborhood, to server, to folder1 - - and saw the full path string being
built step by step - but upon file selection it only keeps the folder/file
info in the address field and throws out the other part of the path...
perhaps this is due to its default opening location.

Is it XP or Access that determines the default opening location and how
does
one change it?
 
N

NetworkTrade

yes I had seen this; but thanks for reminding me of it.... I do not fully
understand whether something can be entered into the Database's Hyperlink
Base property to fix this problem. My experiments did not work; and
searching on this topic doesn't locate many dialogs.

If the FE is at MyPC C:/FolderFE/FE.mdb

and a typical jpg file is at Server F:/Folder1/Folder2/Photos/filename.jpg

EditHyperlink is just putting in: Photos/filename.jpg

Am not sure what is suppose to be entered into the Hyperlink Base property
that would result in the EditHyperlink path being correct - or whether it is
even possible to make a fix via this approach.
 
A

Allen Browne

IME, setting the Base doesn't fix the problem that it returns relative
addresses.
 
C

CK

NTC,

I wonder of my problem is similar to yours?
I am having problems with the link looking something like
\..\..\folder\filename
Is this what you are/were getting? Have you managed to solve it?

My edithyperlink macro works fine on my site, but my colleagues on a
different site, using the same laptops and software get what I describe
above. Could this be a settings issue. I do not have any hyperlink base in my
database.
It seems we can get it to work on their site by mapping a drive to a letter
and this way the whole hyperlink is posted. This would work only if everyone
maps the same drive with the same letter.
 

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