try to decompile the database and /or
application.saveastext & application.LoadFromText
Public Sub DocDatabase(Optional ByVal Path As String = "C:\Temp\")
'====================================================================
' Name: DocDatabase
' Purpose: Documents the database to a series of text files
'
' Author: Arvin Meyer
' Date: June 02, 1999
' Comment: Uses the undocumented [Application.SaveAsText] syntax
' To reload use the syntax [Application.LoadFromText]
' Modified to set a reference to DAO 8/22/2005
' Modifed by Pieter Wijnen 2006-02-04:
' Added Path as Parameter, Split By Container, MakeDir, Fully Qualifed
References, Removed redundant doc from Next
'====================================================================
Dim dbs As DAO.Database
Dim Cnt As DAO.Container
Dim Doc As DAO.Document
Dim Qdef As DAO.QueryDef
Set dbs = Access.CurrentDb() ' use CurrentDb() to refresh Collections
On Error GoTo Err_DocDatabase
VBA.MkDir (Path)
Path = Path & VBA.Dir(dbs.Name)
VBA.MkDir (Path)
Set Cnt = dbs.Containers("Forms")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acForm, Doc.Name, Path
& "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc
Set Cnt = dbs.Containers("Reports")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acReport, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc
Set Cnt = dbs.Containers("Scripts")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acMacro, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc
Set Cnt = dbs.Containers("Modules")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acModule, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc
VBA.MkDir (Path & "\" & "Queries")
dbs.QueryDefs.Refresh
For Each Qdef In dbs.QueryDefs
Access.Application.SaveAsText Access.AcObjectType.acQuery, Qdef.Name,
Path & "\" & Cnt.Name & "\" & Qdef.Name & ".txt"
Next 'i
Exit_DocDatabase:
Set Cnt = Nothing
Set dbs = Nothing
Exit Sub
Err_DocDatabase:
With VBA.Err
Select Case .Number
Case 75 'MkDir Fails
Resume Next
Case Else
VBA.MsgBox "(" & .Number & ") " & .Description,
VBA.VbMsgBoxStyle.vbInformation, .Source
Resume Exit_DocDatabase
End Select
End With
End Sub
HtH
Pieter