Link external file to an existing database.

amerifax

Registered User.
Local time
Yesterday, 19:16
Joined
Apr 9, 2007
Messages
304
Logically I'm thinking what I need can be done. I just don't have a clue on to the direction start. Basically it's trying to take all the files in a given directory and add them into a existing database.

I have a database called Permit. the database has a field called "SEAL" and they will be creating an additional field "SCART" to hold the contents of the file that exist in the directory. Each image file, in directory, is named the same as a unique record in Permit.
example:
Permit-SC might have unique record 532442
An image file would be name 532442.

If the image file matches a record in Permit the image should be added to permit in a field called "SCART". At this point I'm not certain if I want a link or the actual image included in the record. since there's a possibility of including the permit file on the website it might be cleaner to have it included. But I'm getting way ahead of myself. I only need to find a way to make that link.

Bob
 
Permit can be anything Table or database. What ever will work best.

Permit is a table or database that has a field called "SC". "SC" contains the filenames of images that reside in a directory on my hard drive.

I have added an additional field to Permit-"SCART". I need to create a link to matching files. Since both the filename and the Permit-"SC" contain equal values a link is possible.

Image filename 532233.jpg would exist in Permit-SC as 532233, it would be minus the extension .jpg.

If I can accomplish what I need to do the Permit database would have an additional field called "SCART" that would contain a link to an image file 532233.jpg

Bob
 
Last edited:
I did check it out. It's a bit over my head. I also think it's probably far greater than what I'm looking for. I just have a stack of files and I want to create a record in the database that contains the file name and a link to it. Based on my limited knowledge of Access I might have to run some kind of a macro over the weekend's. But thanks.
Bob
 
Yes. It would be a table. Either way I see notning can work
Bob
 
I have been searching around looking for a solution. All in trying to do is find out if a filename, in one folder, exist in my Access database, table. I was thinking that Access cannot look into a directory itself what may be VBA could.

It's a matter of a file, name, existing in Access, and if it is, creating a link to the image file for future use.

Bob
 
Yes the mission was to capture all the filenames. No one was able to figure it out anywhere. But by chance I resolved the issue by capturing over 6500 files in less than 30 seconds. So even though it's not part of Access I did want to share this amazing accomplishment:

I'm afraid I was trying to invent the wheel. My biggest problem was how to capture the names of 6500 filenames so i could import them into Access. Well I did a very simple search on the web, came up with an answer that gave me the ability to accomplish my task in less than five minutes.

Here is my search: "capture filenames in directory";

Here was the answer:
Do you want to copy all file names in a specific folder and save it as a text file? If so, you don’t need any special tools, all you need is Windows and a command prompt. How-to guide after the break.
http://windows7themes.net/how-to-copy-file-names-from-folder-as-text.html

In less than 30 seconds I had captured a text file that contained a list of over 6500 filenames.

I just had to share this even though it had not much to do with Access. But then again it does.

Bob
 

Users who are viewing this thread

Back
Top Bottom