I know it's probably to late for this now, but a while ago, there was a thread on something else, but there was this method of saving and retrieving info using the .SaveAsText and .LoadFromText (hidden) methods of the application object.
Here's the thread thread705-751080, I just did a very quick test on one of my db's, and it did work! Note however bboffin's reservations at the end of the thread.
Question is whether it's applicable in this case, where this method isn't used to save the info, but if it's possible to try to save the the objects this way now...
Here's a quick and dirty LoadAllFromText function. If you've saved with bboffin's code, then just create a new db, import/link all the tables, paste this function into a new module and run it using the same path... it actually recreates all objects! You should only have to set the references, compile, save and...
- note haven't tested this thouroughly, but all form/report events, and other code worked on rather complex db;-) Nice if it would decrease the amount of work for you, and would be interesting to hear how it worked on a corrupt db
[tt]Public Function LoadAllFromText(sPath)
Dim dbs As Object
Dim fso As Object
Dim fld As Object
Dim fls As Object
Dim fl As Object
Set dbs = CurrentDb
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder(sPath)
Set fls = fld.Files
For Each fl In fls
Select Case Right$(fl.Name, 4)
Case ".xcf"
Application.LoadFromText acForm, _
Left$(fl.Name, Len(fl.Name) - 4), sPath & "\" & fl.Name
Case ".xcr"
Application.LoadFromText acReport, _
Left$(fl.Name, Len(fl.Name) - 4), sPath & "\" & fl.Name
Case ".xcm"
Application.LoadFromText acModule, _
Left$(fl.Name, Len(fl.Name) - 4), sPath & "\" & fl.Name
Case ".xcs"
Application.LoadFromText acMacro, _
Left$(fl.Name, Len(fl.Name) - 4), sPath & "\" & fl.Name
Case ".xcq"
Application.LoadFromText acQuery, _
Left$(fl.Name, Len(fl.Name) - 4), sPath & "\" & fl.Name
End Select
Next fl
Set dbs = Nothing
Set fso = Nothing
Set fld = Nothing
Set fls = Nothing
Debug.Print "Finished..."
End Function[/tt]
Roy-Vidar