Evil hyperlinks ....

M

m.cringle

I have split my database into front and back-ends, with the intention
of sharing on the company network. Now - originally, I had both
'parts/bits' on my P:\ but now need to install a front-end on each
users own pc (C:\), to prevent the database being corrupted (so I'm
told).

However, now that I have installed a front-end on my C:\ (to test
before installing on others machines) all my hyperlinks are broken! I
could understand why they would break if I had moved any of the linked
files but not the MDB file.

btw - by install I mean copying the MDB file and pasting it into a
folder on my C:\

All the links (including any new ones) still work fine in the back-end.
Surely a filepath is the same no matter where you start from?

I'm confused - please help!!
 
J

Jeff Boyce

If your original front-end referred to a "share" (e.g., P:\) on the network,
but your PC doesn't have that share defined (or has it defined differently),
the PC's front-end won't be able to "see" the back-end.

If you use UNC (\\server\folder\...) instead, the front-end should be able
to see the back-end no matter what.

"Hyperlinks"? Where/how are you using hyperlinks?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Joe Reynolds

an ABSOLUTE filepath is the same no matter where you start from, a RELATIVE
filepath is relative to where you start from.
aside from that, i have no clue what youre even talking about
 
M

m.cringle

I have ran the linked table manager and they are linked fine. When I
enter info into the front end it is updated in the back-end - so all is
ok there.

The database is used to keep an eye on our competition - we enter any
relevant news articles (summaries) and published accounts. The original
documents are then saved according to an arranged file structure and a
hyperlink is included in the record pointing to the original document.
I have created hyperlink fields in the relevant tables and inserted
them by using the shortcut menu (left click in the field and navigate
to file).

The new hyperlinks that have been added since the front-end has been
moved work fine but the 'old' hyperlinks do not (although they work
fine if I try directly from the tables in the back-end still on the
P:\)

I don't understand how by moving the front end from my P:\ to C:\ would
break these links - Also, could this be a problem for all different
users? because people will need to access hyperlinks that have been
entered by other users.
 
M

m.cringle

Some further info ...

I just had another look and noticed that all my old hyperlinks don't
actually show the drive letter (P:\) or the main folder name of the
file they are related to - where as the new ones do.

For example
old:
..\Competitor Reports\Other Companies\Real Time Gaming\Online casino
cautions - 22 Sept 2006.doc

New:
P:\Competitor Analysis\Competitor Reports\Other Companies\Fairground
Gaming\FAIRGROUND GAMING PUTS SPIN PALACE ONLINE GAMBLING ACQUISITION
TO WORK - 25 Sept 2006.doc

Hmmm .... Does the old hyperlink not include the drive letter and main
folder name because they were (at the time) located on the same drive
and in the same main folder?

When I manually changed a hyperlink to include the start of the file
path (P:\Competitor Analysis...) it works fine.

Only problem is that I now have about 2/3000 of the things to change -
any ideas how best to do this? If I just find and replace, wont it just
change the text and not the actual filepath?

Really appreciate the help :)
 
J

Jeff Boyce

Another responder (Joe) pointed out the difference between Absolute and
Relative paths.

My original response pointed out the difference between "share" and "UNC"
paths.

Your old version used relative paths.

Your new version uses "share" paths.

I foresee potential problems in the future if you have any other users who
don't have a "P:\" share set up on their PC.

Given that a hyperlink is text, perhaps you could work out an update query
that "fixed" the first part of the string...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

m.cringle

No worries - got it!

If anyone is interested:

I had to create a copy of my database, then change the offending
hyperlink field into a memo field. Then I had to delete the additional
text / string after the main URL in each individual record (very
annoying and tedious). Then change the field back to a hyperlink field.

Also, before this I had to do a find and replace on all hyperlinks
starting "..\" - replacing with the correct start of the filepath as it
was not all shown.

Finally, I went into my original database - file and get external data
(in both the front and back-ends) and ensured the offending table was
correctly linked using the linked table manager.

Surely Microsoft could make this easier for us??

Thanks anyways
 
J

Jeff Boyce

If you did this "manually", you may have worked too hard. Did you take a
look at using an update query?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

m.cringle

Jeff said:
If you did this "manually", you may have worked too hard. Did you take a
look at using an update query?

I did try an update query originally but unfortunately all I could get
it to do was change the text in the hyperlink. The offending problem is
the string that is not shown in the field (unless you change to a memo
field) - and then I was not sure how to wite some code that would only
delete the part of the text required.

eg. this is how the URL looked before using the find and replace - and
deleting the additional text:

...\Competitor Reports\Other Companies\Real Time Gaming\Online casino
cautions - 22 Sept
2006.doc#../Competitor%20Reports/Other%20Companies/Real%20Time%20Gaming/Online%20casino%20cautions%20%20-%2022%20Sept%202006.doc#

To make this work, I had to find and replace the start of the URL "..\"
with "P:\Competitor Analysis\" and then delete all the text between the
# and # (if that makes sense?)

Maybe I could change the field to a memo field before running the
update query - only thinkg then I would need is some code that would
delete anything between (and including) the # & #

If you know how I could do this easier in future that would be great -
I'm sure this will come up again and I still have a few more to do :)
 
J

Jeff Boyce

Hmmm? "Replace" ...

Take a look at the Replace() function and see if it might help.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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