Solved

Import Attachments to Existing Table

Posted on 2014-04-05
3
1,046 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now