Solved

Import Attachments to Existing Table

Posted on 2014-04-05
3
1,089 Views
Last Modified: 2014-04-05
Hello Experts,

I have an existing table that I need to add attachments from another Access 2010 database.  I need the record ID in the imported attachment records to match the record ID of the existing table.

What occurred here is that this is an Access 2010 Web database and when I was trying to replicate an existing Web Database application I kept getting a SharePoint I/O error, after doing some research I discovered that this was occurring because of an attachment with an illegal character in it's name.  So I just deleted the attachments data column and I was able to publish the web database.

Now I need to add back the attachments I deleted; now since this is occurring client side I should be able to use standard VBA, Macros or whatever to accomplish this so it's not restricted to web type objects which is why I didn't just tag this for Access Services.

Thank you

p.s. It would be preferable to have this solution do each attachment record as a loop or something similar so I can tell where it fails.  This way I could also identify the attachment(s) that were resulting in my original I/O SharePoint issue and then fix them by renaming or deleting just those specific attachments.
0
Comment
Question by:ShadowIT
  • 2
3 Comments
 
LVL 57
ID: 39980043
Not quite sure I understand what your trying to do, but see if this gets you started:

How to: Work With Attachments In DAO
http://msdn.microsoft.com/en-us/library/office/ff835669%28v=office.14%29.aspx

at the bottom, it show how to loop on the file data and save to disk.   At the top, how to load from a file.

So this would allow you to move the data from one DB to another.

Jim.
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39980046
Here's a link to one of the Access MVP sites that has a good demo on working with Attachment fields:

http://www.accessmvp.com/thedbguy/demos.asp

Jim.
0
 

Author Closing Comment

by:ShadowIT
ID: 39980671
That's exactly what I was looking for...thanks!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question