transporting hyperlinks (1 Viewer)

Artcare

New member
Local time
Tomorrow, 06:06
Joined
Sep 6, 2019
Messages
4
To keep my dB under 2Gb I have created a hyperlink field that directs to a series of folders containing hundreds of pdfs. Keeping the pdfs as attachments in Access blew the file size.

My problem is that when I transport the database and linked folders to a new location, ie to a clients computer, the links are no longer valid. Is there a way to simply automate this process so that when the dB and associated pdf folders are transported the hyperlink connects to the folders in the new location.

Thanks,

Andrew
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:06
Joined
Oct 29, 2018
Messages
21,358
Hi Andrew. Welcome to AWF!


One approach you could try is to not use a Hyperlink field and simply use Text field. Furthermore, I might suggest only storing the filename in this field rather than the full path. You could then have a separate table where you could specify the root path to these folders. Hopefully, you will be able to construct a full path using the root folder, information from your data, and the filename. You can then use some code to open each file based on the calculated full path.
 

Artcare

New member
Local time
Tomorrow, 06:06
Joined
Sep 6, 2019
Messages
4
Thanks for your quick reply.
My database is to be distributed to users who may know less about ACCESS than I do. I want to avoid programming and I want to avoid multi-step operations that require a deeper understanding of the program. The attachment option appealed at first because I could collate all relevant files in there. As I said I soon exploded the the 2 Gb ceiling and then went to hyperlinks as a way of keeping the files out of the database.

I want the end user to be able to simply press a button and get the info in front of their nose.

This is a database for analyzing pigments using a Polarizing Light Microscope and creates the vital link that is a feature of all other analytical instruments. The user will be focused on the analytical fields in the database itself but occasionally want to access the literature on where the pigment has been found in artworks.

That is my summary requirement; that I want the link to external files to be simple and immediate.

Thanks again,

Andrew
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 12:06
Joined
Oct 29, 2018
Messages
21,358
Thanks for your quick reply.
My database is to be distributed to users who may know less about ACCESS than I do. I want to avoid programming and I want to avoid multi-step operations that require a deeper understanding of the program. The attachment option appealed at first because I could collate all relevant files in there. As I said I soon exploded the the 2 Gb ceiling and then went to hyperlinks as a way of keeping the files out of the database.

I want the end user to be able to simply press a button and get the info in front of their nose.

This is a database for analyzing pigments using a Polarizing Light Microscope and creates the vital link that is a feature of all other analytical instruments. The user will be focused on the analytical files in the database but occasionally want to access the literature on where the pigment has been found in artworks.

That is my summary requirement; that I want the link to external files to be simple and immediate.

Thanks again,

Andrew
Hi Andrew. What you want your users to be able to do is all up to you as the developer. Your users don't need to know programming, you do. So, if you want the user to simply click a button and magic happens, you'll have to create that button for them and make it do the magic you want to happen when they click it. Nothing comes easy without doing some hard work first. So, what I'm trying to say is, if you want to make it easy for your users, you may have to make it harder for you, because you'll have to do a lot of work up front.

What you're asking to do is not very hard. It may just take some design changes and a little bit of code to implement.

Otherwise, another option you could try is keep the Attachment option but store the images in a separate DB file. You can link one front end file to several back end files at the same time.
 

Artcare

New member
Local time
Tomorrow, 06:06
Joined
Sep 6, 2019
Messages
4
Thanks again for that. The other option I have is to simply get the end user to do a universal "Find and Replace" on the hyperlink table, to change the drive letter and any other file information to suit them.

I have never programmed in the Access environment, which I imagine 90% of users don't do, which is why they chose Access over other software. Perhaps members of this forum are the 10% who routinely program. If I had the time I would sit down and do that but am grateful that Access and Filemaker allow me to get on with what I earn my living at.

Thanks again, I appreciate the rapid replies.

Andrew
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:06
Joined
Oct 29, 2018
Messages
21,358
Thanks again for that. The other option I have is to simply get the end user to do a universal "Find and Replace" on the hyperlink table, to change the drive letter and any other file information to suit them.

I have never programmed in the Access environment, which I imagine 90% of users don't do, which is why they chose Access over other software. Perhaps members of this forum are the 10% who routinely program. If I had the time I would sit down and do that but am grateful that Access and Filemaker allow me to get on with what I earn my living at.

Thanks again, I appreciate the rapid replies.

Andrew
Hi Andrew. You are correct that Access allows for rapid development of pretty sophisticated systems by non programmers. I guess I mistook you for a developer when you referred to your colleagues as users, which to me translates as you're the developer. In that case, you came to the right place. Many of us here know a little bit how to program in Access, so new users, who don't know how to program in Access can get help. However, one of the principles I try to follow when answering questions in the forums is to guide the user into becoming a little bit of a programmer. In other words, although I have done it on occasions, I tend not to write the program for the person asking. Instead, I try to teach them, as much as practical, on how to do what they are asking, so they can do more later on.
What works well in forums is if you have done your research and tried some things, then you can post specific questions about what you tried and describe what happened. For example, if you could post a code you were trying to create, but it's not working, we could maybe easily point out what's wrong with it. If you ask a general question, you might get a general answer. If you have a complex problem, try breaking it down into separate pieces and then ask a question about each piece. Hope that makes sense...
 

Micron

AWF VIP
Local time
Today, 15:06
Joined
Oct 20, 2018
Messages
3,476
Any chance that at the other locations they would place the documents one level down from wherever the db is? If they would do that, you could easily use the CurrentProject.Path property and append the the rest of the paths to it. e.g.

db gets installed in F:databases\YourDbName and the file tree begins with sub folder Documents\...

then it shouldn't matter if a user's native drive letter is H as it would become
H:databases\YourDbName\Documents\...

Or you can utilize the msoFileDialogFolder picker and have a user navigate to the document root folder, but the paths would have to be the same as yours after that point.


EDIT
Had to use lower case D else colon and D = smilie face. Can't escape a colon??
 

Artcare

New member
Local time
Tomorrow, 06:06
Joined
Sep 6, 2019
Messages
4
Thanks for that Micron (eye rolling noted).

When the external folders get hyperlinked they state the full path name in the hyperlink field, which is not related to the dB storage location. They are just on the same drive. The dB and folders will be provided to the user in one folder, with various sub-folders, and that then transported to the users machine with its own file structure.

The problem is in how my hyperlink field identifies the location of the linked files. I am happy to continue with the find and replace option but just assumed there would be a simple way of maintaining the link. This must be a problem for anyone passing on databases. It only exists for locally stored files, whereas there is no problem with web links.

Thanks,

Andrew
 

Micron

AWF VIP
Local time
Today, 15:06
Joined
Oct 20, 2018
Messages
3,476
Not sure I expressed the idea clearly.
First, I wouldn't use a hyperlink field at all - have read they can be buggy and I've always managed this without them. What I'd use instead is a text field containing the path from the first folder below the db on down to each file (still not sure after reading your last post, but I'm assuming the folder tree for the files is part of the distribution thus it will be the same wherever the db is).

Thus, whenever calling up a file, code would prepend the db path (regardless of what that is) to the file path and serve up the file, which again, I understand is in the same location from user to user.

Now, if you're allowing users to click on a hyperlink path in a table or query field, that is part of your problem. Users should not interact with table or query fields. My suggestion is based on using a form that has a field that presents the concatenation of the 2 paths to the user. You can format the control to display the path as a hyperlink without having a hyperlink field in the table, IIRC. Or you can provide some other means to retrieve the document, depending on the form design.

Hope that helps.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:06
Joined
Oct 29, 2018
Messages
21,358
Not sure I expressed the idea clearly.
And I was basically trying to say the same thing at the beginning when I suggested to use a Text field instead of a Hyperlink. It is very easy in Access to combine two or more pieces of information together to build the full path to the file, so it shouldn’t be a problem even if the image folders get installed somewhere else.
 

Users who are viewing this thread

Top Bottom