How I Exported an Attachment fields data to a folder
At the time, (maybe I didn’t do enough research), I probably also underestimated the quantity of scanned documents the customer would have and the impact on the database file size.
From the start, the database was split into a Front End and a Back End.
At inception, the Back End was about 3MB in size. it is over 660MB in size and growing with every scanned document.
I started doing research online to figure out how I could export of the scanned documents from the Attachment field, save them to a folder, and then add their location to a new table and field so the customer could still access them.
It’s important to note that each scanned contract is associated with a customer order and I would need to ensure that whenever my customer went to a customer’s order, they would see only those scanned contracts.
I never found in one place a “How To Export Attachments” article so I decided to summarize here what I did in the hope that it helps others that need to reverse stored documents/pictures/etc.
Maintaining the relationship to thelocation in the database are now being saved was critical.
Before you begin, make sure you back up your Back End data as well as your Front End. Also, please hold the feedback on how I named my fields and/or tables. I’m comfortable with it and it works for me. Yes, I know sometimes I need to use brackets on my field/table names.
One sample code that I used was from the Microsoft Access 2010 Programmer’s Reference manual. I modified the code slightly and it is shown below:
Thank you for taking the time to report an issue.
What's wrong... Please write below.
My problem: I recently gathered some data in the attachment fields in the development copy of the database and wanted to transfer the additions to the production table. The update query came back with a message to the effect that you can't use an attachment field in an update query.
Has anyone else encountered this problem? If so, what is the workaround? VB or manual re-entry of the data
It does not open with the Excel Macro in order to run. I was able to transfer the data to Excel and I was able to open the Macro Excel but when it runs, it runs on itself not on the exported file.
As of right now all of my Transferspreadsheets are in ACCESS Macro, not in VBA and they are being exported as expected. I just need to add a RunCode using Module that will coincide with the Transferspreadsheets as it gets exported to the desired folder and run it and save.
I am pretty confident that this could beaccomplished but needs to make sure the Excel Macro is working on the exported file not on itself.
On a form, I can see a record’s information, including two hyperlink attachments (one links to a folder, the other to another folder or file on the local computer). I click the link and each opens, no issues.
What I would like to do:
-Click a command button that opens an email (I have that down),
-The coding would then look at the current record, identify the two attachment links, pull the file from the attachment and add it to the email from my local machine (the crazy part).
-To add, I’d like the files to be zipped to the attachment (the crazier part).
-For example, the file is stored at C:\Users\Steve21nj\Desktop\ Items\Email\MGA-12-60000
The reasoning: We will need to send audit reports based on the pdf’s in the folder (the attachments). I’d like to eliminate user error by not attaching the correct file/folder.
I have seen the ability to push the hyperlink itself on the email, but not the hyperlink’s data (file) into the email. Also, I have read about the hatred for hyperlink fields, is there abetter alternative for the above?
We 'exported' data from the FORM. This exported data into a single excel spreadsheet with columns which included fields from several of the access tables. (because of the combo boxes).
We made changes to the single excel spreadsheet (but no new or changed names of columns/fields - only typing errors of data).
Then we import BACK into the DB - but it wants to import into a TABLE not a FORM. There is not a single TABLE that has all the values because the FORM was made up of several TABLES.
So how do we get the exported data, imported back in? Should this be easy?
The data set of the form is actually a query that contains all the fields required for the export.
If I place all the fields on the (continuous) form but make the ones the user doesn't need to see invisible they are not exported using the standard external data->export/Excel. I can think of a couple of ways round this like making all the fields visible but transparent/white font etc or placing a button on the form and generating the export by dynamically creatinga query based on any filtering the user may have chosen.
However, I was wondering if there is a tidier way to achieve the export of the required fields?
I deleted data and then started entering member data for the directory. Now for the problem. an old family picture shows up until I add a new picture.
I would like to add an image to individual data files.