Move attachments to a folder outside of access (1 Viewer)

emame

New member
Local time
Today, 06:54
Joined
Mar 6, 2020
Messages
4
When I discovered the attached field I found the maximum and with great sense of use, I immediately started to imagine how useful it would be to save pdf to consult the invoices as well as save other important documents. And in terms of operation it is perfect.

I only have one problem, access has evolved a lot but the limitation of the 2gb in size remains.

At this time due to this limitation in conjunction with the use of attachments my database is close to 2gb already having several ways to corrupt.
So I need a solution to move all attachments to a folder outside of access but keep the path / link to that attachment with the ease that we currently have with the attached field.
I've seen several solutions but I confess that I was a little confused (maybe because my English is not very good!) With the way of putting it into practice.

Does anyone have a database with some code in operation (example) in order to check if it meets the necessary?

Obrigado !
 

emame

New member
Local time
Today, 06:54
Joined
Mar 6, 2020
Messages
4
Thanks for your response.
I had already seen this solution and not quite what I am looking for. In this solution he extracts the images from the attachment and groups them by ID in order to facilitate the search.
In my case I already have this folder made out of access in all my attachments.

I haven't figured out how the attached field works yet, but it looks like it stores a shadow copy of the attached file and not its original location. If that is the case where he does not save that location then possibly I will have no solution but to put everything back manually, if he saves the original location then there may be a solution to export that location and somehow put it as the file location.

can someone confirm how access stores this field?
 

moke123

AWF VIP
Local time
Today, 02:54
Joined
Jan 11, 2013
Messages
3,852
I'm not sure I understand your requirement.

Do you want to move the attachments to a folder and delete them from the attachment field?
Do you need to move them and save the location to the table?
Do you already have the files in folders and only want to get the file paths?
How many attachments are there per record? How many attachments overall?

can someone confirm how access stores this field?
I dont use them for the reason I quess you just learned about. I believe they are a multivalued field that stores the object(binary?) as well as the name and filetype.
 

jdraw

Super Moderator
Staff member
Local time
Today, 02:54
Joined
Jan 23, 2006
Messages
15,364
emame,
Regardless of how Access stores data/images/etc as an "embedded attachment", what exactly do you want to do?
The most favored approach is to store images in the file system (outside of Access) and to record in a table the file name, and the path to the file. This has been done for several years before the attachment type field even existed. As you and others have found, storing images and pdfs etc within the database quickly increases the database size. The 2Gb limit exists and is a driving factor in avoiding attachment fields.
If you provide some sample info and description of requirement, then I'm sure readers will offer more focused advice.

Here is more info about MVF from Isladogs.
Here is a video by Steve Bishop showing storing pdfs/images etc on the filesystem and displaying same on a form. Hope it's useful to you.

Good luck with your project
 
Last edited:

Cronk

Registered User.
Local time
Today, 17:54
Joined
Jul 4, 2013
Messages
2,770
It seems to me that the more Microsoft does to dumb down Access to make it easier for entry level users, the more time bombs it has introduced.
 

emame

New member
Local time
Today, 06:54
Joined
Mar 6, 2020
Messages
4
Hello good morning jdraw,

Yesterday I was researching and found an example that seems to solve part of my problem.
HTC_DocMan4.mdb
This example does what it is saying puts only the link to the file and you can view it if you want and if you change the location of the site stops opening the file. In other words, it is independent.

As I have a specific location for the attachments already created, I can link to that location of the file, the annoying thing that I will have to go through about 3000 records and manually add the location of the attachments....
 

jdraw

Super Moderator
Staff member
Local time
Today, 02:54
Joined
Jan 23, 2006
Messages
15,364
Did you look at the links I provided? They may give you some ideas or at least some additional info.
If you have an organized approach to your "filing system", then you may be able to design a process by which you identify and update your records with the file coordinates programmatically.
I would not start this manually. But you know your details better than readers.

If you want to provide some detailed info on your current set up--real examples -then forum members can help you with design and/or testing.
Good luck with your project.
 

Users who are viewing this thread

Top Bottom