A
AFKAFB
Hi
I've been given some code by a subscriber to this forum
The first part of the code suggested to save a corrupt DB works fine.
The files have now been saved.
But now I'm stuck.
I saved the files from Database_A.mdb to my drive.
I created a new DB, Database_B.mdb.
I inserted a module ('mdl_restore_code') in Database_B.mdb with the
following code:
On Error GoTo Err_DocDatabase
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim i As Integer
Set dbs = CurrentDb() ' use CurrentDb() to refresh Collections
Set cnt = dbs.Containers("Forms")
For Each doc In cnt.Documents
Application.LoadFromText acForm, doc.Name, "R:\Basel\Basel 2
Securitisation\05 Database\Application\B2-SCC Access Model\Downloaded
access objects\" & doc.Name & ".txt"
Next doc
Etc. for the other objects
But the error message is that the Access cannot open this text file.
where am i going wrong
Regards
chris
I've been given some code by a subscriber to this forum
The first part of the code suggested to save a corrupt DB works fine.
The files have now been saved.
But now I'm stuck.
I saved the files from Database_A.mdb to my drive.
I created a new DB, Database_B.mdb.
I inserted a module ('mdl_restore_code') in Database_B.mdb with the
following code:
On Error GoTo Err_DocDatabase
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim i As Integer
Set dbs = CurrentDb() ' use CurrentDb() to refresh Collections
Set cnt = dbs.Containers("Forms")
For Each doc In cnt.Documents
Application.LoadFromText acForm, doc.Name, "R:\Basel\Basel 2
Securitisation\05 Database\Application\B2-SCC Access Model\Downloaded
access objects\" & doc.Name & ".txt"
Next doc
Etc. for the other objects
But the error message is that the Access cannot open this text file.
where am i going wrong
Regards
chris