5 pts.
 Export Attachmets
How do you export all attachments for all records from Access 2007 database?

Software/Hardware used:
ASKED: November 18, 2008  6:44 PM
UPDATED: November 19, 2008  8:23 PM

Answer Wiki:
If you are referring to the linked or attached TABLES in Access, you can pull that out of the tables collection using VBA. To run my sample code, First create a table called "TableLinks" with text columns called Name and Connect. Then paste this code into a module and run it: Public Sub LoadTableLinks() Dim db As Database, rs As Recordset, x As Integer Set db = CurrentDb() Set rs = db.OpenRecordset("TableLinks", dbOpenDynaset) For x = 0 To db.TableDefs.Count - 1 'exclude system tables If Left(db.TableDefs(x).Name, 4) = "MSys" Then GoTo Next_X End If 'exclude tables that are not attached tables If db.TableDefs(x).Connect = "" Or IsNull(db.TableDefs(x).Connect) Then GoTo Next_X End If rs.AddNew rs![TableName] = db.TableDefs(x).Name rs![Connection] = db.TableDefs(x).Connect rs.Update Next_X: Next x End Sub
Last Wiki Answer Submitted:  November 19, 2008  8:23 pm  by  Randym   1,740 pts.
All Answer Wiki Contributors:  Randym   1,740 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _