I have a corrupted MS Access database. I am not able to open it anymore. However it contains important data. What can I do to recover the data?
Caution Create a copy of the damaged database to avoid causing irrecoverable damage during the repair process.
To recover data from a damaged database table, follow these steps:
- Make a copy of the damaged database table. Re-create or paste the structure only of the damaged database table to a new table.
- Open the damaged database table and the copy of the table structure so that you can see both tables.
- Switch to the damaged database table. On the View menu, click Datasheet View, and then select the whole record by clicking the record selectors that are the blank buttons to the left of each record. On the Edit menu, click Copy to copy the records from the damaged database table.
- Switch to the new table, put the pointer in a location that will put the data in the same location that the data was located in in the damaged database table. On the Edit menu, click Paste.
- Test the table after each copy-and-paste operation. Repeat steps 4 through 6 by using single records or small groups of records until you receive an error message while testing only the corrupted records that remain. Then, re-type any data that cannot be moved to the new table.
Note You may be able to print the data from the damaged database table to make this step easier.
- After all records have been moved to the new table, create a new blank database in Access with a different name than the damaged database.
- Import the new table and all undamaged objects to the new database, and then quit Access.
- Rename the damaged database or move the damaged database to a new location. Delete the .ldb file for the corrupted database if the .ldb file exists, and then move the new database to the location that you want.
- Rename the repaired database to the name of the damaged database.
- Always test a recovered database before you return the recovered database to the production environment.
- Do not delete the damaged database until recovery is confirmed.
- When you duplicate fields with the DataType property set to Auto Number, set the DataType to Number, and set the FieldSize property to Long Integer for the field in the recovered table. To revert them back to AutoNumber and still retain their original value, you have to create another table that is your final recovered table. Complete the previous steps to create the interim table by using Long Integer. Then, copy a new blank table by using Structure Only from the original table. Make sure to include the AutoNumber field. Use an Append query to append the good records from the newly recovered table. This correctly brings across the AutoNumber values to the newly recovered table.