I have an Access 97 database that is corrupt and cannot be repaired when prompted to repair on start up. Does anyone know if there is a way to save it?
The following code is straight out of the ACCESS 97 help file, you might try to use it from inside another database, just change the name of the database from Northwind to your own. If it doesn't solve your problem, you will probably have to create a new database and import each object one at a time. You should get an error message when you attempt to import the object that is corrupted, and will have to rebuild it. I've never had to do this, but I've read elsewhere about this advice on importing one at a time. Good Luck<br><br>This example attempts to repair the database named Northwind.mdb. You cannot run this procedure from a module within Northwind.mdb.<br><br>Sub RepairDatabaseX()<br><br> Dim errLoop As Error<br><br> If MsgBox("Repair the Northwind database?", _<br> vbYesNo) = vbYes Then<br> On Error GoTo Err_Repair<br> DBEngine.RepairDatabase "Northwind.mdb"<br> On Error GoTo 0<br> MsgBox "End of repair procedure!"<br> End If<br><br> Exit Sub<br><br>Err_Repair:<br><br> For Each errLoop In DBEngine.Errors<br> MsgBox "Repair unsuccessful!" & vbCr & _<br> "Error number: " & errLoop.Number & _<br> vbCr & errLoop.Description<br><br>Next errLoop<br><br>End Sub<br><br><br><br><br>HTH<br><br>Paulf
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.