Export Attachmets
5 pts.
0
Q:
Export Attachmets
How do you export all attachments for all records from Access 2007 database?
ASKED: Nov 18 2008  6:44 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
1410 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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 Answered: Nov 19 2008  8:23 PM GMT by Randym   1410 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0