compressing attached files

moaffaqq

New member
Local time
Today, 21:26
Joined
Aug 18, 2024
Messages
2
Looking for ms access VAB code "after update" in the form, to compress or to reduce the size of the attached files in the "attachments" column in the table. attached files such PDF, JPG, pictures...
Thank you
 
Last edited:
You should be storing the files externally and just hold the path in the dB. No need to zip then.
Otherwise, I believe you would need to

Save attachment as file
Zip file

However then you would need to unzip everytime you want to view it.

Add 'with vba' (WTQ) to both those statements for a Google search.
 
Thanks mate for the above answer,
I am storing pictures in a column, also storing PDF files in another column
I would write a code to compress the attached file using external "command line tool" maybe or any simple way,
the thing took me long time with no positive result
 
You need to Save the file externally first.
See the link I posted in #3
 
Looking for ms access VAB code "after update" in the form, to compress or to reduce the size of the attached files in the "attachments" column in the table. attached files such PDF, JPG, pictures...
Thank you
Hi. Welcome to AWF!

As already mentioned, this is very possible, but the better approach is to not store the attachments inside the database at all. How many files are we talking about? Also, if you do this, you may need a new approach to avoid doing it again in the future, right?
 
[...] to compress or to reduce the size of the attached files in the "attachments" column in the table. attached files such PDF, JPG, pictures...
Don't expect much from this.
Most image file formats are already very compressed and any further compression, e.g. ZIP, will only reduce the size by less than 5% if at all.
PDFs either contain text + markup only and are already quite small, or they contain embedded images and the above will also apply to them.
 

Users who are viewing this thread

Back
Top Bottom