Couple horrible hours ago I haven't opened my dear database, I have seen error: The database 'Ler2.mdb' needs to be repaired or isn't a database file. I asked urgent help to my workers. Nothing works.
Couple horrible hours ago I haven't opened my dear database, I have seen error: The database 'Ler2.mdb' needs to be repaired or isn't a database file. I asked urgent help to my workers. Nothing works.
Sometimes Access databases become corrupted, and cannot be repaired.
One method that has always worked for me is to do the following:
Open a new, blank database, and go to Import Access Database, browse to your old database and select all Objects, Relationships, and Import/Export specifications and then start using this new database.
It is pretty quick and easy, and just about everything comes over (including VBA).
The only things I have found that don't come over are some database settings, like if you are selecting a Startup Form or are hiding the Navigation Pane. But those are quick and easy to set in the new database.
Hi Tia and welcome.
Do you have a recent backup?
BEFORE trying what Joe suggested, make a BACKUP COPY of your db then try the following.
1. If you can open the db, do a compact and repair - in database tools menu
2. If that doesn't fix it, DECOMPILE your database to remove any corrupted compile code
See this link for more info
http://www.fmsinc.com/MicrosoftAcces.../Decompile.asp
After that you need to RECOMPILE - open the Visual Basic Editor then click Debug...Compile.
Finally compact and repair again.
If both fail, do what Joe suggested ....but no guarantee that will work either
And remember to make regular backups
I must be lucky, this has worked every time for me, without fail (but sadly, "Compact and Repair" never has)!If both fail, do what Joe suggested ....but no guarantee that will work either
Lucky so far ....?
I often decompile and that nearly always works.
It's very quick and has no downside.
If even that fails, the database may be so unreadable that you can't even get a list of objects to import to your clean db.
That has happened to me on several occasions over the years.
I admit, I have tried "Compact & Repair" many times, but never tried decompiling.
That link looks like a good resource.
You also hit on another good point:
It is always a good plan to backup your database regularly, so if all else fails, you at least have something good to go back too. All of ours are backed up nightly.Do you have a recent backup?