Searching Subfolders To Open Files Using File Names (1 Viewer)

ProphetBob

New member
Local time
Today, 06:21
Joined
May 19, 2015
Messages
3
I have not been able to find a solution to my dilemma in these forums of via Google/Bing. If anyone can re-direct me to a thread or advise how to accomplish I would greatly appreciate. I am self-taught so don’t always understand the coding.

I am using Access 2010 with Win-7. Shared, split database with several users.

Database Purpose: PM Procedure for Medical Equipment

Goal: To be able for the user to copy the file name of 1 or more technical manuals and paste into a table used for a subform on the procedure parent form. Users can then open the related files stored in a common directory that are related to the procedure when later reviewing the procedure .

Problem: File path on the common drive for our group remains static “\\Syspro_5\VOL1\BIOMED\COMMON\Equipment (Service Manual)”. The subfolders are not static. There is an unlimited number of sub folders by vendor, model, or make. The subfolders sometimes get renamed as vendors change ownership. The file itself usually does not get renamed. New subfolders get added as needed. Everyone in our group has access to this area of the server.

Question: Is there a way in VBA that when a user opens the procedure record form and dbl-clicks the name of the file in the subform, Access can start at the parent folder and keep searching through all the subfolders until it finds the file? I cannot depend on people in my group to be able to correctly update hyperlinks so I need a way people with no Access knowledge can even use – even if it’s a little slow.

Thanks for any help!
 

BlueIshDan

☠
Local time
Today, 07:21
Joined
May 15, 2014
Messages
1,122
I don't know how much this can help but you can try this function I wrote, and maybe the link on this post may help you even further.

Follow this link.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 10:21
Joined
Sep 12, 2006
Messages
15,613
2 ways.

1. yes, you could search every folder for a filename. What if the file is there twice or more though?

2. for proper document control, why manually change the subfolder name. Just manage it all through the database. Put everything in a single folder, (or a small number of main folders) and let access determine the file path/name based on salient document features. That's what I would do.
 

ProphetBob

New member
Local time
Today, 06:21
Joined
May 19, 2015
Messages
3
Gemma, that probably would resolve a lot of issues we have in our dept. But, my job description is not a programmer. I'm doing this Access stuff 'above-and-beyond the call of duty" so to speak - gratis. I'm normally maintaining the equipment that's used to keep people alive.

I certainly like your suggestion and I now recall seeing some examples in the past - just don't remember where... If you can point to an example I'd appreciate it.

Grateful to all for the replies!
 

Users who are viewing this thread

Top Bottom