How to recover VBA code from corrupt Access database?

Darrell Burns 141 Reputation points
2023-07-03T18:51:36.25+00:00

I have a corrupted Access database at the 2GB file size limit that throws the following error when I try to open. Holding the <shift> key down throws the same error, as does linking it from another database. I need to recover the VBA code. Any ideas?

Corrupt Access Database

Corrupt Database

Microsoft 365 and Office | Access | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tanay Prasad 2,255 Reputation points
    2023-07-05T06:40:35.67+00:00

    Hi,

    I'd suggest you try the following methods in order to recover your VBA code-

    NOTE- Before trying any of these methods, please keep a backup.

    1. Use the in-built utility by MS Access known as "Compact and Repair".
    2. Create a new access database and import the objects (tables, queries, forms, reports, modules, etc.) from the corrupted database into this new access database.
    3. If the above methods don't work, you should consider using a third-party tool specifically designed to recover data from corrupted Access databases like DataNumen, Stellar etc.

    You can also try some more methods mentioned in this link in order to fix this error.. https://learn.microsoft.com/en-us/office/troubleshoot/access/error-inserting-table-record-autonumber

    Best Regards.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.